|
11941
|
252
|
0
|
2026-04-14T10:35:59.573699+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776162959573_m1.jpg...
|
iTerm2
|
-zsh
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
"n": 1,
"text_source": "n": 1,
"text_source": "ocr"
},
{
"app_name": "Preview",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "QuickTime Player",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "System Settings",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "ocr"
}
]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST [URL_WITH_CREDENTIALS] ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20
zsh: no matches found: COUNT(*)
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10
Error: in prepare, incomplete input
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite "SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;"
[{"app_name":"Boosteroid","n":1301},
{"app_name":"iTerm2","n":581},
{"app_name":"Firefox","n":338},
{"app_name":"Claude","n":173},
{"app_name":"Code","n":35},
{"app_name":"Dia","n":31},
{"app_name":"Alfred","n":24},
{"app_name":"Safari","n":20},
{"app_name":"Finder","n":19},
{"app_name":"QuickTime Player","n":16},
{"app_name":"UserNotificationCenter","n":4},
{"app_name":"Activity Monitor","n":4},
{"app_name":"NetAuthAgent","n":3},
{"app_name":"Control Centre","n":3},
{"app_name":"Slack","n":2},
{"app_name":"Raycast","n":2},
{"app_name":"System Settings","n":1},
{"app_name":"Preview","n":1}]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite "SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;"
timestamp app_name window_name
-------------------------------- -------- -----------
2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh
2026-04-12T13:33:13.963922+00:00
2026-04-12T13:33:13.415261+00:00
2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh
2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh
2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh
2026-04-12T13:33:05.165254+00:00 Claude Claude
2026-04-12T13:32:50.425455+00:00
2026-04-12T13:32:49.108195+00:00 Claude Claude
2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-13T15:11:31+03:00",
"uptime": 19271.640087958,
"fps": 0.11841234008027791,
"frames": 2282
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
256M /Users/lukas/.screenpipe/data
418M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
196K /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
675M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls
config.json db.sqlite db.sqlite-wal screenpipe.2026-04-09.0.log screenpipe.2026-04-12.0.log
data db.sqlite-shm pipes screenpipe.2026-04-11.0.log screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 858888
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 0
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data
drwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions
-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .
233M .
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.
du: /./usr/sbin/authserver: Permission denied
du: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /./Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /./Library/Application Support/ApplePushService: Permission denied
du: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /./Library/Application Support/com.apple.TCC: Operation not permitted
du: /./Library/Application Support/Iru/Quarantine: Permission denied
du: /./Library/Application Support/Iru/Cached Items: Permission denied
du: /./Library/Trial: Operation not permitted
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*
14G /Applications
du: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /Library/Application Support/ApplePushService: Permission denied
du: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /Library/Application Support/com.apple.TCC: Operation not permitted
du: /Library/Application Support/Iru/Quarantine: Permission denied
du: /Library/Application Support/Iru/Cached Items: Permission denied
du: /Library/Trial: Operation not permitted
du: /Library/Tailscale/files: Permission denied
du: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted
du: /Library/Caches/com.apple.aneuserd: Operation not permitted
du: /Library/Caches/com.apple.iconservices.store: Permission denied
du: /Library/Caches/com.apple.aned: Operation not permitted
5.6G /Library
^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh *
39M 2026-04-09
62M 2026-04-11
57M 2026-04-12
73M 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 871176
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: No such file or directory
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 13 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 14 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
sudo: a password is required
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe
cp: /Users/lukas/.screenpipe/data/data is a directory (not copied).
cp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13
cp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 1022008
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
UW PICO 5.09 New Buffer
[ Read 378 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T09:44:01+03:00",
"uptime": 1243.255541917,
"fps": 0.254975738544637,
"frames": 317
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T10:12:37+03:00",
"uptime": 2959.307842208,
"fps": 0.[CREDIT_CARD],
"frames": 929
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
887M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
308M /Users/lukas/.screenpipe/data
561M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
18M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
392M /Users/lukas/.screenpipe/data
660M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
15M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
44K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
477M /Users/lukas/.screenpipe/data
770M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
8.0M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
60K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.3G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
-zsh...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"\"n\": 1,\n \"text_source\": \"ocr\"\n },\n {\n \"app_name\": \"Preview\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"QuickTime Player\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"System Settings\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"ocr\"\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST http://localhost:3030/raw_sql \\\n -H \"Content-Type: application/json\" \\\n -d '{\"query\": \"SELECT COUNT(*) as ocr_rows FROM ocr_text LIMIT 1\"}' \\\n | python3 -m json.tool\n[\n {\n \"ocr_rows\": 2752\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20\nzsh: no matches found: COUNT(*)\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10\nError: in prepare, incomplete input\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite \"SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;\"\n[{\"app_name\":\"Boosteroid\",\"n\":1301},\n{\"app_name\":\"iTerm2\",\"n\":581},\n{\"app_name\":\"Firefox\",\"n\":338},\n{\"app_name\":\"Claude\",\"n\":173},\n{\"app_name\":\"Code\",\"n\":35},\n{\"app_name\":\"Dia\",\"n\":31},\n{\"app_name\":\"Alfred\",\"n\":24},\n{\"app_name\":\"Safari\",\"n\":20},\n{\"app_name\":\"Finder\",\"n\":19},\n{\"app_name\":\"QuickTime Player\",\"n\":16},\n{\"app_name\":\"UserNotificationCenter\",\"n\":4},\n{\"app_name\":\"Activity Monitor\",\"n\":4},\n{\"app_name\":\"NetAuthAgent\",\"n\":3},\n{\"app_name\":\"Control Centre\",\"n\":3},\n{\"app_name\":\"Slack\",\"n\":2},\n{\"app_name\":\"Raycast\",\"n\":2},\n{\"app_name\":\"System Settings\",\"n\":1},\n{\"app_name\":\"Preview\",\"n\":1}]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite \"SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;\"\ntimestamp app_name window_name\n-------------------------------- -------- -----------\n2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh \n2026-04-12T13:33:13.963922+00:00 \n2026-04-12T13:33:13.415261+00:00 \n2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh \n2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh \n2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh \n2026-04-12T13:33:05.165254+00:00 Claude Claude \n2026-04-12T13:32:50.425455+00:00 \n2026-04-12T13:32:49.108195+00:00 Claude Claude \n2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-13T15:11:31+03:00\",\n \"uptime\": 19271.640087958,\n \"fps\": 0.11841234008027791,\n \"frames\": 2282\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n256M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n418M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n196K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe \n675M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls\nconfig.json\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-wal\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-09.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-12.0.log\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-shm\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpipes\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-11.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 858888\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll\ntotal 0\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data\ndrwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions\n-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .\n233M\u0000\u0000\u0000\t.\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.\ndu: /./usr/sbin/authserver: Permission denied\ndu: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /./Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /./Library/Application Support/ApplePushService: Permission denied\ndu: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /./Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /./Library/Application Support/Iru/Quarantine: Permission denied\ndu: /./Library/Application Support/Iru/Cached Items: Permission denied\ndu: /./Library/Trial: Operation not permitted\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*\n 14G\u0000\u0000\u0000\t/Applications\ndu: /Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /Library/Application Support/ApplePushService: Permission denied\ndu: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /Library/Application Support/Iru/Quarantine: Permission denied\ndu: /Library/Application Support/Iru/Cached Items: Permission denied\ndu: /Library/Trial: Operation not permitted\ndu: /Library/Tailscale/files: Permission denied\ndu: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted\ndu: /Library/Caches/com.apple.aneuserd: Operation not permitted\ndu: /Library/Caches/com.apple.iconservices.store: Permission denied\ndu: /Library/Caches/com.apple.aned: Operation not permitted\n5.6G\u0000\u0000\u0000\t/Library\n^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh * \n 39M\u0000\u0000\u0000\t2026-04-09\n 62M\u0000\u0000\u0000\t2026-04-11\n 57M\u0000\u0000\u0000\t2026-04-12\n 73M\u0000\u0000\u0000\t2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 871176\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: No such file or directory\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 13 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 14 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \nsudo: a password is required\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe \ncp: /Users/lukas/.screenpipe/data/data is a directory (not copied).\ncp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13\ncp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd .. \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 1022008\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 378 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T09:44:01+03:00\",\n \"uptime\": 1243.255541917,\n \"fps\": 0.254975738544637,\n \"frames\": 317\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T10:12:37+03:00\",\n \"uptime\": 2959.307842208,\n \"fps\": 0.3139247586039762,\n \"frames\": 929\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n887M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n308M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n561M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 18M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n392M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n660M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 15M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 44K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/* \n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n477M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n770M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n8.0M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 60K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe \n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.3G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $","depth":4,"value":"\"n\": 1,\n \"text_source\": \"ocr\"\n },\n {\n \"app_name\": \"Preview\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"QuickTime Player\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"System Settings\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"ocr\"\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST http://localhost:3030/raw_sql \\\n -H \"Content-Type: application/json\" \\\n -d '{\"query\": \"SELECT COUNT(*) as ocr_rows FROM ocr_text LIMIT 1\"}' \\\n | python3 -m json.tool\n[\n {\n \"ocr_rows\": 2752\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20\nzsh: no matches found: COUNT(*)\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10\nError: in prepare, incomplete input\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite \"SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;\"\n[{\"app_name\":\"Boosteroid\",\"n\":1301},\n{\"app_name\":\"iTerm2\",\"n\":581},\n{\"app_name\":\"Firefox\",\"n\":338},\n{\"app_name\":\"Claude\",\"n\":173},\n{\"app_name\":\"Code\",\"n\":35},\n{\"app_name\":\"Dia\",\"n\":31},\n{\"app_name\":\"Alfred\",\"n\":24},\n{\"app_name\":\"Safari\",\"n\":20},\n{\"app_name\":\"Finder\",\"n\":19},\n{\"app_name\":\"QuickTime Player\",\"n\":16},\n{\"app_name\":\"UserNotificationCenter\",\"n\":4},\n{\"app_name\":\"Activity Monitor\",\"n\":4},\n{\"app_name\":\"NetAuthAgent\",\"n\":3},\n{\"app_name\":\"Control Centre\",\"n\":3},\n{\"app_name\":\"Slack\",\"n\":2},\n{\"app_name\":\"Raycast\",\"n\":2},\n{\"app_name\":\"System Settings\",\"n\":1},\n{\"app_name\":\"Preview\",\"n\":1}]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite \"SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;\"\ntimestamp app_name window_name\n-------------------------------- -------- -----------\n2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh \n2026-04-12T13:33:13.963922+00:00 \n2026-04-12T13:33:13.415261+00:00 \n2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh \n2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh \n2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh \n2026-04-12T13:33:05.165254+00:00 Claude Claude \n2026-04-12T13:32:50.425455+00:00 \n2026-04-12T13:32:49.108195+00:00 Claude Claude \n2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-13T15:11:31+03:00\",\n \"uptime\": 19271.640087958,\n \"fps\": 0.11841234008027791,\n \"frames\": 2282\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n256M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n418M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n196K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe \n675M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls\nconfig.json\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-wal\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-09.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-12.0.log\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-shm\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpipes\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-11.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 858888\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll\ntotal 0\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data\ndrwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions\n-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .\n233M\u0000\u0000\u0000\t.\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.\ndu: /./usr/sbin/authserver: Permission denied\ndu: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /./Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /./Library/Application Support/ApplePushService: Permission denied\ndu: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /./Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /./Library/Application Support/Iru/Quarantine: Permission denied\ndu: /./Library/Application Support/Iru/Cached Items: Permission denied\ndu: /./Library/Trial: Operation not permitted\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*\n 14G\u0000\u0000\u0000\t/Applications\ndu: /Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /Library/Application Support/ApplePushService: Permission denied\ndu: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /Library/Application Support/Iru/Quarantine: Permission denied\ndu: /Library/Application Support/Iru/Cached Items: Permission denied\ndu: /Library/Trial: Operation not permitted\ndu: /Library/Tailscale/files: Permission denied\ndu: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted\ndu: /Library/Caches/com.apple.aneuserd: Operation not permitted\ndu: /Library/Caches/com.apple.iconservices.store: Permission denied\ndu: /Library/Caches/com.apple.aned: Operation not permitted\n5.6G\u0000\u0000\u0000\t/Library\n^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh * \n 39M\u0000\u0000\u0000\t2026-04-09\n 62M\u0000\u0000\u0000\t2026-04-11\n 57M\u0000\u0000\u0000\t2026-04-12\n 73M\u0000\u0000\u0000\t2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 871176\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: No such file or directory\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 13 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 14 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \nsudo: a password is required\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe \ncp: /Users/lukas/.screenpipe/data/data is a directory (not copied).\ncp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13\ncp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd .. \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 1022008\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 378 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T09:44:01+03:00\",\n \"uptime\": 1243.255541917,\n \"fps\": 0.254975738544637,\n \"frames\": 317\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T10:12:37+03:00\",\n \"uptime\": 2959.307842208,\n \"fps\": 0.3139247586039762,\n \"frames\": 929\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n887M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n308M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n561M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 18M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n392M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n660M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 15M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 44K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/* \n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n477M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n770M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n8.0M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 60K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe \n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.3G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.004166667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.12291667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.12708333,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.24583334,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.25,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.36875,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.37291667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.49166667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.49583334,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.6145833,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.61875,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.7375,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.7416667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.86041665,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.8645833,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.9548611,"top":0.032222223,"width":0.03888889,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"-zsh","depth":1,"bounds":{"left":0.48819444,"top":0.033333335,"width":0.022916667,"height":0.017777778},"role_description":"text"}]...
|
-2118115267680464601
|
5684305736308878995
|
idle
|
accessibility
|
NULL
|
"n": 1,
"text_source": "n": 1,
"text_source": "ocr"
},
{
"app_name": "Preview",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "QuickTime Player",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "System Settings",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "ocr"
}
]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST [URL_WITH_CREDENTIALS] ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20
zsh: no matches found: COUNT(*)
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10
Error: in prepare, incomplete input
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite "SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;"
[{"app_name":"Boosteroid","n":1301},
{"app_name":"iTerm2","n":581},
{"app_name":"Firefox","n":338},
{"app_name":"Claude","n":173},
{"app_name":"Code","n":35},
{"app_name":"Dia","n":31},
{"app_name":"Alfred","n":24},
{"app_name":"Safari","n":20},
{"app_name":"Finder","n":19},
{"app_name":"QuickTime Player","n":16},
{"app_name":"UserNotificationCenter","n":4},
{"app_name":"Activity Monitor","n":4},
{"app_name":"NetAuthAgent","n":3},
{"app_name":"Control Centre","n":3},
{"app_name":"Slack","n":2},
{"app_name":"Raycast","n":2},
{"app_name":"System Settings","n":1},
{"app_name":"Preview","n":1}]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite "SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;"
timestamp app_name window_name
-------------------------------- -------- -----------
2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh
2026-04-12T13:33:13.963922+00:00
2026-04-12T13:33:13.415261+00:00
2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh
2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh
2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh
2026-04-12T13:33:05.165254+00:00 Claude Claude
2026-04-12T13:32:50.425455+00:00
2026-04-12T13:32:49.108195+00:00 Claude Claude
2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-13T15:11:31+03:00",
"uptime": 19271.640087958,
"fps": 0.11841234008027791,
"frames": 2282
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
256M /Users/lukas/.screenpipe/data
418M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
196K /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
675M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls
config.json db.sqlite db.sqlite-wal screenpipe.2026-04-09.0.log screenpipe.2026-04-12.0.log
data db.sqlite-shm pipes screenpipe.2026-04-11.0.log screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 858888
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 0
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data
drwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions
-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .
233M .
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.
du: /./usr/sbin/authserver: Permission denied
du: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /./Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /./Library/Application Support/ApplePushService: Permission denied
du: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /./Library/Application Support/com.apple.TCC: Operation not permitted
du: /./Library/Application Support/Iru/Quarantine: Permission denied
du: /./Library/Application Support/Iru/Cached Items: Permission denied
du: /./Library/Trial: Operation not permitted
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*
14G /Applications
du: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /Library/Application Support/ApplePushService: Permission denied
du: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /Library/Application Support/com.apple.TCC: Operation not permitted
du: /Library/Application Support/Iru/Quarantine: Permission denied
du: /Library/Application Support/Iru/Cached Items: Permission denied
du: /Library/Trial: Operation not permitted
du: /Library/Tailscale/files: Permission denied
du: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted
du: /Library/Caches/com.apple.aneuserd: Operation not permitted
du: /Library/Caches/com.apple.iconservices.store: Permission denied
du: /Library/Caches/com.apple.aned: Operation not permitted
5.6G /Library
^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh *
39M 2026-04-09
62M 2026-04-11
57M 2026-04-12
73M 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 871176
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: No such file or directory
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 13 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 14 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
sudo: a password is required
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe
cp: /Users/lukas/.screenpipe/data/data is a directory (not copied).
cp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13
cp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 1022008
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
UW PICO 5.09 New Buffer
[ Read 378 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T09:44:01+03:00",
"uptime": 1243.255541917,
"fps": 0.254975738544637,
"frames": 317
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T10:12:37+03:00",
"uptime": 2959.307842208,
"fps": 0.[CREDIT_CARD],
"frames": 929
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
887M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
308M /Users/lukas/.screenpipe/data
561M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
18M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
392M /Users/lukas/.screenpipe/data
660M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
15M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
44K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
477M /Users/lukas/.screenpipe/data
770M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
8.0M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
60K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.3G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
-zsh...
|
11940
|
|
11942
|
253
|
0
|
2026-04-14T10:35:59.518771+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776162959518_m2.jpg...
|
iTerm2
|
-zsh
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
"n": 1,
"text_source": "n": 1,
"text_source": "ocr"
},
{
"app_name": "Preview",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "QuickTime Player",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "System Settings",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "ocr"
}
]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST [URL_WITH_CREDENTIALS] ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20
zsh: no matches found: COUNT(*)
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10
Error: in prepare, incomplete input
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite "SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;"
[{"app_name":"Boosteroid","n":1301},
{"app_name":"iTerm2","n":581},
{"app_name":"Firefox","n":338},
{"app_name":"Claude","n":173},
{"app_name":"Code","n":35},
{"app_name":"Dia","n":31},
{"app_name":"Alfred","n":24},
{"app_name":"Safari","n":20},
{"app_name":"Finder","n":19},
{"app_name":"QuickTime Player","n":16},
{"app_name":"UserNotificationCenter","n":4},
{"app_name":"Activity Monitor","n":4},
{"app_name":"NetAuthAgent","n":3},
{"app_name":"Control Centre","n":3},
{"app_name":"Slack","n":2},
{"app_name":"Raycast","n":2},
{"app_name":"System Settings","n":1},
{"app_name":"Preview","n":1}]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite "SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;"
timestamp app_name window_name
-------------------------------- -------- -----------
2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh
2026-04-12T13:33:13.963922+00:00
2026-04-12T13:33:13.415261+00:00
2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh
2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh
2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh
2026-04-12T13:33:05.165254+00:00 Claude Claude
2026-04-12T13:32:50.425455+00:00
2026-04-12T13:32:49.108195+00:00 Claude Claude
2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-13T15:11:31+03:00",
"uptime": 19271.640087958,
"fps": 0.11841234008027791,
"frames": 2282
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
256M /Users/lukas/.screenpipe/data
418M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
196K /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
675M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls
config.json db.sqlite db.sqlite-wal screenpipe.2026-04-09.0.log screenpipe.2026-04-12.0.log
data db.sqlite-shm pipes screenpipe.2026-04-11.0.log screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 858888
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 0
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data
drwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions
-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .
233M .
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.
du: /./usr/sbin/authserver: Permission denied
du: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /./Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /./Library/Application Support/ApplePushService: Permission denied
du: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /./Library/Application Support/com.apple.TCC: Operation not permitted
du: /./Library/Application Support/Iru/Quarantine: Permission denied
du: /./Library/Application Support/Iru/Cached Items: Permission denied
du: /./Library/Trial: Operation not permitted
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*
14G /Applications
du: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /Library/Application Support/ApplePushService: Permission denied
du: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /Library/Application Support/com.apple.TCC: Operation not permitted
du: /Library/Application Support/Iru/Quarantine: Permission denied
du: /Library/Application Support/Iru/Cached Items: Permission denied
du: /Library/Trial: Operation not permitted
du: /Library/Tailscale/files: Permission denied
du: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted
du: /Library/Caches/com.apple.aneuserd: Operation not permitted
du: /Library/Caches/com.apple.iconservices.store: Permission denied
du: /Library/Caches/com.apple.aned: Operation not permitted
5.6G /Library
^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh *
39M 2026-04-09
62M 2026-04-11
57M 2026-04-12
73M 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 871176
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: No such file or directory
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 13 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 14 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
sudo: a password is required
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe
cp: /Users/lukas/.screenpipe/data/data is a directory (not copied).
cp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13
cp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 1022008
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
UW PICO 5.09 New Buffer
[ Read 378 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T09:44:01+03:00",
"uptime": 1243.255541917,
"fps": 0.254975738544637,
"frames": 317
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T10:12:37+03:00",
"uptime": 2959.307842208,
"fps": 0.[CREDIT_CARD],
"frames": 929
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
887M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
308M /Users/lukas/.screenpipe/data
561M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
18M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
392M /Users/lukas/.screenpipe/data
660M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
15M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
44K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
477M /Users/lukas/.screenpipe/data
770M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
8.0M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
60K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.3G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
-zsh...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"\"n\": 1,\n \"text_source\": \"ocr\"\n },\n {\n \"app_name\": \"Preview\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"QuickTime Player\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"System Settings\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"ocr\"\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST http://localhost:3030/raw_sql \\\n -H \"Content-Type: application/json\" \\\n -d '{\"query\": \"SELECT COUNT(*) as ocr_rows FROM ocr_text LIMIT 1\"}' \\\n | python3 -m json.tool\n[\n {\n \"ocr_rows\": 2752\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20\nzsh: no matches found: COUNT(*)\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10\nError: in prepare, incomplete input\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite \"SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;\"\n[{\"app_name\":\"Boosteroid\",\"n\":1301},\n{\"app_name\":\"iTerm2\",\"n\":581},\n{\"app_name\":\"Firefox\",\"n\":338},\n{\"app_name\":\"Claude\",\"n\":173},\n{\"app_name\":\"Code\",\"n\":35},\n{\"app_name\":\"Dia\",\"n\":31},\n{\"app_name\":\"Alfred\",\"n\":24},\n{\"app_name\":\"Safari\",\"n\":20},\n{\"app_name\":\"Finder\",\"n\":19},\n{\"app_name\":\"QuickTime Player\",\"n\":16},\n{\"app_name\":\"UserNotificationCenter\",\"n\":4},\n{\"app_name\":\"Activity Monitor\",\"n\":4},\n{\"app_name\":\"NetAuthAgent\",\"n\":3},\n{\"app_name\":\"Control Centre\",\"n\":3},\n{\"app_name\":\"Slack\",\"n\":2},\n{\"app_name\":\"Raycast\",\"n\":2},\n{\"app_name\":\"System Settings\",\"n\":1},\n{\"app_name\":\"Preview\",\"n\":1}]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite \"SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;\"\ntimestamp app_name window_name\n-------------------------------- -------- -----------\n2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh \n2026-04-12T13:33:13.963922+00:00 \n2026-04-12T13:33:13.415261+00:00 \n2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh \n2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh \n2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh \n2026-04-12T13:33:05.165254+00:00 Claude Claude \n2026-04-12T13:32:50.425455+00:00 \n2026-04-12T13:32:49.108195+00:00 Claude Claude \n2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-13T15:11:31+03:00\",\n \"uptime\": 19271.640087958,\n \"fps\": 0.11841234008027791,\n \"frames\": 2282\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n256M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n418M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n196K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe \n675M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls\nconfig.json\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-wal\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-09.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-12.0.log\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-shm\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpipes\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-11.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 858888\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll\ntotal 0\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data\ndrwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions\n-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .\n233M\u0000\u0000\u0000\t.\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.\ndu: /./usr/sbin/authserver: Permission denied\ndu: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /./Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /./Library/Application Support/ApplePushService: Permission denied\ndu: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /./Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /./Library/Application Support/Iru/Quarantine: Permission denied\ndu: /./Library/Application Support/Iru/Cached Items: Permission denied\ndu: /./Library/Trial: Operation not permitted\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*\n 14G\u0000\u0000\u0000\t/Applications\ndu: /Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /Library/Application Support/ApplePushService: Permission denied\ndu: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /Library/Application Support/Iru/Quarantine: Permission denied\ndu: /Library/Application Support/Iru/Cached Items: Permission denied\ndu: /Library/Trial: Operation not permitted\ndu: /Library/Tailscale/files: Permission denied\ndu: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted\ndu: /Library/Caches/com.apple.aneuserd: Operation not permitted\ndu: /Library/Caches/com.apple.iconservices.store: Permission denied\ndu: /Library/Caches/com.apple.aned: Operation not permitted\n5.6G\u0000\u0000\u0000\t/Library\n^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh * \n 39M\u0000\u0000\u0000\t2026-04-09\n 62M\u0000\u0000\u0000\t2026-04-11\n 57M\u0000\u0000\u0000\t2026-04-12\n 73M\u0000\u0000\u0000\t2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 871176\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: No such file or directory\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 13 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 14 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \nsudo: a password is required\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe \ncp: /Users/lukas/.screenpipe/data/data is a directory (not copied).\ncp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13\ncp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd .. \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 1022008\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 378 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T09:44:01+03:00\",\n \"uptime\": 1243.255541917,\n \"fps\": 0.254975738544637,\n \"frames\": 317\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T10:12:37+03:00\",\n \"uptime\": 2959.307842208,\n \"fps\": 0.3139247586039762,\n \"frames\": 929\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n887M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n308M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n561M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 18M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n392M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n660M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 15M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 44K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/* \n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n477M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n770M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n8.0M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 60K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe \n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.3G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $","depth":4,"value":"\"n\": 1,\n \"text_source\": \"ocr\"\n },\n {\n \"app_name\": \"Preview\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"QuickTime Player\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"System Settings\",\n \"n\": 1,\n \"text_source\": \"accessibility\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"hybrid\"\n },\n {\n \"app_name\": \"iTerm2\",\n \"n\": 1,\n \"text_source\": \"ocr\"\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST http://localhost:3030/raw_sql \\\n -H \"Content-Type: application/json\" \\\n -d '{\"query\": \"SELECT COUNT(*) as ocr_rows FROM ocr_text LIMIT 1\"}' \\\n | python3 -m json.tool\n[\n {\n \"ocr_rows\": 2752\n }\n]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20\nzsh: no matches found: COUNT(*)\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10\nError: in prepare, incomplete input\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite \"SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;\"\n[{\"app_name\":\"Boosteroid\",\"n\":1301},\n{\"app_name\":\"iTerm2\",\"n\":581},\n{\"app_name\":\"Firefox\",\"n\":338},\n{\"app_name\":\"Claude\",\"n\":173},\n{\"app_name\":\"Code\",\"n\":35},\n{\"app_name\":\"Dia\",\"n\":31},\n{\"app_name\":\"Alfred\",\"n\":24},\n{\"app_name\":\"Safari\",\"n\":20},\n{\"app_name\":\"Finder\",\"n\":19},\n{\"app_name\":\"QuickTime Player\",\"n\":16},\n{\"app_name\":\"UserNotificationCenter\",\"n\":4},\n{\"app_name\":\"Activity Monitor\",\"n\":4},\n{\"app_name\":\"NetAuthAgent\",\"n\":3},\n{\"app_name\":\"Control Centre\",\"n\":3},\n{\"app_name\":\"Slack\",\"n\":2},\n{\"app_name\":\"Raycast\",\"n\":2},\n{\"app_name\":\"System Settings\",\"n\":1},\n{\"app_name\":\"Preview\",\"n\":1}]\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite \"SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;\"\ntimestamp app_name window_name\n-------------------------------- -------- -----------\n2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh \n2026-04-12T13:33:13.963922+00:00 \n2026-04-12T13:33:13.415261+00:00 \n2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh \n2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh \n2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh \n2026-04-12T13:33:05.165254+00:00 Claude Claude \n2026-04-12T13:32:50.425455+00:00 \n2026-04-12T13:32:49.108195+00:00 Claude Claude \n2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-13T15:11:31+03:00\",\n \"uptime\": 19271.640087958,\n \"fps\": 0.11841234008027791,\n \"frames\": 2282\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n256M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n418M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n196K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe \n675M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls\nconfig.json\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-wal\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-09.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-12.0.log\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tdb.sqlite-shm\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpipes\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-11.0.log\u0000\u0000\u0000\u0000\tscreenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 858888\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll\ntotal 0\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data\ndrwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions\n-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .\n233M\u0000\u0000\u0000\t.\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.\ndu: /./usr/sbin/authserver: Permission denied\ndu: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /./Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /./Library/Application Support/ApplePushService: Permission denied\ndu: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /./Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /./Library/Application Support/Iru/Quarantine: Permission denied\ndu: /./Library/Application Support/Iru/Cached Items: Permission denied\ndu: /./Library/Trial: Operation not permitted\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*\n 14G\u0000\u0000\u0000\t/Applications\ndu: /Library/Application Support/Apple/ParentalControls/Users: Permission denied\ndu: /Library/Application Support/Apple/AssetCache/Data: Permission denied\ndu: /Library/Application Support/ApplePushService: Permission denied\ndu: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied\ndu: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied\ndu: /Library/Application Support/com.apple.TCC: Operation not permitted\ndu: /Library/Application Support/Iru/Quarantine: Permission denied\ndu: /Library/Application Support/Iru/Cached Items: Permission denied\ndu: /Library/Trial: Operation not permitted\ndu: /Library/Tailscale/files: Permission denied\ndu: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted\ndu: /Library/Caches/com.apple.aneuserd: Operation not permitted\ndu: /Library/Caches/com.apple.iconservices.store: Permission denied\ndu: /Library/Caches/com.apple.aned: Operation not permitted\n5.6G\u0000\u0000\u0000\t/Library\n^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied\n^C\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh * \n 39M\u0000\u0000\u0000\t2026-04-09\n 62M\u0000\u0000\u0000\t2026-04-11\n 57M\u0000\u0000\u0000\t2026-04-12\n 73M\u0000\u0000\u0000\t2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 871176\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: No such file or directory\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 13 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \ncp: /Volumes/screenpipe/db.sqlite: Operation not permitted\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite\nPassword:\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 14 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \nsudo: a password is required\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls\ndata\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\t\u0000\u0000\u0000\u0000\u0000\u0000\u0000\tpending-transcriptions\u0000\tscreenpipe.db\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe \ncp: /Users/lukas/.screenpipe/data/data is a directory (not copied).\ncp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll\ntotal 24\ndrwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..\n-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store\ndrwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09\ndrwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11\ndrwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12\ndrwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13\ncp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd .. \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll\ntotal 1022008\ndrwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .\ndrwx------+ 91 lukas staff 2912 13 Apr 17:09 ..\n-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json\ndrwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data\n-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite\n-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm\n-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal\ndrwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes\n-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log\n-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log\n-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log\n-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop\nscreenpipe stopped\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n UW PICO 5.09 New Buffer \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n [ Read 378 lines ] \n^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos \n^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell \n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T09:44:01+03:00\",\n \"uptime\": 1243.255541917,\n \"fps\": 0.254975738544637,\n \"frames\": 317\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status\n{\n \"status\": \"healthy\",\n \"frame_status\": \"ok\",\n \"audio_status\": \"disabled\",\n \"last_frame\": \"2026-04-14T10:12:37+03:00\",\n \"uptime\": 2959.307842208,\n \"fps\": 0.3139247586039762,\n \"frames\": 929\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n887M\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n308M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n561M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 18M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 32K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*\n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n392M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n660M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n 15M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 44K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log \nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/* \n4.0K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/config.json\n477M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/data\n770M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite\n 64K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-shm\n8.0M\u0000\u0000\u0000\t/Users/lukas/.screenpipe/db.sqlite-wal\n 24K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/pipes\n132K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log\n 96K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log\n 72K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log\n 60K\u0000\u0000\u0000\t/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe \n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.2G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe\n1.3G\u0000\u0000\u0000\t/Users/lukas/.screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.23320313,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.23554687,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.30234376,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3046875,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.37148437,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3738281,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.440625,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.44296876,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.5097656,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.5121094,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.57890624,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.58125,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.64804685,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.6503906,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.7171875,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.71953124,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.7703125,"top":1.0,"width":0.021875,"height":-0.02013886},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"-zsh","depth":1,"bounds":{"left":0.5078125,"top":1.0,"width":0.012890625,"height":-0.020833373},"role_description":"text"}]...
|
-2118115267680464601
|
5684305736308878995
|
idle
|
accessibility
|
NULL
|
"n": 1,
"text_source": "n": 1,
"text_source": "ocr"
},
{
"app_name": "Preview",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "QuickTime Player",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "System Settings",
"n": 1,
"text_source": "accessibility"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "hybrid"
},
{
"app_name": "iTerm2",
"n": 1,
"text_source": "ocr"
}
]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ curl -s -X POST [URL_WITH_CREDENTIALS] ~ $ sqlite3 -json ~/.screenpipe/db.sqlite SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20
zsh: no matches found: COUNT(*)
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10
Error: in prepare, incomplete input
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ clear
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -json ~/.screenpipe/db.sqlite "SELECT app_name, COUNT(*) as n FROM frames WHERE app_name != '' GROUP BY app_name ORDER BY n DESC LIMIT 20;"
[{"app_name":"Boosteroid","n":1301},
{"app_name":"iTerm2","n":581},
{"app_name":"Firefox","n":338},
{"app_name":"Claude","n":173},
{"app_name":"Code","n":35},
{"app_name":"Dia","n":31},
{"app_name":"Alfred","n":24},
{"app_name":"Safari","n":20},
{"app_name":"Finder","n":19},
{"app_name":"QuickTime Player","n":16},
{"app_name":"UserNotificationCenter","n":4},
{"app_name":"Activity Monitor","n":4},
{"app_name":"NetAuthAgent","n":3},
{"app_name":"Control Centre","n":3},
{"app_name":"Slack","n":2},
{"app_name":"Raycast","n":2},
{"app_name":"System Settings","n":1},
{"app_name":"Preview","n":1}]
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 -column -header ~/.screenpipe/db.sqlite "SELECT timestamp, app_name, window_name FROM frames ORDER BY timestamp DESC LIMIT 10;"
timestamp app_name window_name
-------------------------------- -------- -----------
2026-04-12T13:33:14.649009+00:00 iTerm2 -zsh
2026-04-12T13:33:13.963922+00:00
2026-04-12T13:33:13.415261+00:00
2026-04-12T13:33:12.521412+00:00 iTerm2 -zsh
2026-04-12T13:33:09.128387+00:00 iTerm2 -zsh
2026-04-12T13:33:06.137541+00:00 iTerm2 -zsh
2026-04-12T13:33:05.165254+00:00 Claude Claude
2026-04-12T13:32:50.425455+00:00
2026-04-12T13:32:49.108195+00:00 Claude Claude
2026-04-12T13:32:45.339017+00:00 iTerm2 -zsh
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-13T15:11:31+03:00",
"uptime": 19271.640087958,
"fps": 0.11841234008027791,
"frames": 2282
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
256M /Users/lukas/.screenpipe/data
418M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
196K /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
132K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
675M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ls
config.json db.sqlite db.sqlite-wal screenpipe.2026-04-09.0.log screenpipe.2026-04-12.0.log
data db.sqlite-shm pipes screenpipe.2026-04-11.0.log screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 858888
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1038272 13 Apr 17:10 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29277 13 Apr 17:10 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 0
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 .
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 ..
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 data
drwxr-xr-x 2 lukas staff 64 9 Apr 20:05 pending-transcriptions
-rw-r--r-- 1 lukas staff 0 11 Apr 15:03 screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 208 lukas staff 6656 13 Apr 17:11 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh .
233M .
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /.
du: /./usr/sbin/authserver: Permission denied
du: /./Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /./Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /./Library/Application Support/ApplePushService: Permission denied
du: /./Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /./Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /./Library/Application Support/com.apple.TCC: Operation not permitted
du: /./Library/Application Support/Iru/Quarantine: Permission denied
du: /./Library/Application Support/Iru/Cached Items: Permission denied
du: /./Library/Trial: Operation not permitted
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh /*
14G /Applications
du: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
du: /Library/Application Support/Apple/AssetCache/Data: Permission denied
du: /Library/Application Support/ApplePushService: Permission denied
du: /Library/Application Support/org.pqrs/tmp/rootonly: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/141.0.7340.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/142.0.7416.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/crx_cache: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/148.0.7730.0/Crashpad: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/143.0.7482.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/140.0.7273.0: Permission denied
du: /Library/Application Support/Google/GoogleUpdater/144.0.7547.0: Permission denied
du: /Library/Application Support/com.apple.TCC: Operation not permitted
du: /Library/Application Support/Iru/Quarantine: Permission denied
du: /Library/Application Support/Iru/Cached Items: Permission denied
du: /Library/Trial: Operation not permitted
du: /Library/Tailscale/files: Permission denied
du: /Library/Caches/com.apple.amsengagementd.classicdatavault: Operation not permitted
du: /Library/Caches/com.apple.aneuserd: Operation not permitted
du: /Library/Caches/com.apple.iconservices.store: Permission denied
du: /Library/Caches/com.apple.aned: Operation not permitted
5.6G /Library
^[[Adu: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
^C
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ du -sh *
39M 2026-04-09
62M 2026-04-11
57M 2026-04-12
73M 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 871176
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 438190080 13 Apr 17:10 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 6575552 13 Apr 17:12 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 29974 13 Apr 17:11 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: No such file or directory
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 13 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
cp: /Volumes/screenpipe/db.sqlite: Operation not permitted
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sudo cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
Password:
[PASSWORD] PICO 5.09 New Buffer
[ Read 14 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
sudo: a password is required
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cp ~/.screenpipe/db.sqlite /Volumes/Test/screenpipe/db.sqlite
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ls
data pending-transcriptions screenpipe.db
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cp ~/.screenpipe/data/* /Volumes/Test/screenpipe
cp: /Users/lukas/.screenpipe/data/data is a directory (not copied).
cp: /Users/lukas/.screenpipe/data/pending-transcriptions is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 24
drwxr-xr-x 7 lukas staff 224 13 Apr 15:11 .
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 ..
-rw-r--r--@ 1 lukas staff 8196 9 Apr 20:43 .DS_Store
drwxr-xr-x 14 lukas staff 448 11 Apr 14:53 2026-04-09
drwxr-xr-x 30 lukas staff 960 12 Apr 09:02 2026-04-11
drwxr-xr-x 46 lukas staff 1472 13 Apr 15:13 2026-04-12
drwxr-xr-x 156 lukas staff 4992 13 Apr 17:22 2026-04-13
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp ~/.screenpipe/data/data/2026-04-13 /Volumes/Test/screenpipe/data/2026-04-13
cp: /Users/lukas/.screenpipe/data/data/2026-04-13 is a directory (not copied).
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-09 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-11 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cp -r ~/.screenpipe/data/data/2026-04-12 /Volumes/Test/screenpipe/data/
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 1022008
drwxr-xr-x 12 lukas staff 384 13 Apr 00:00 .
drwx------+ 91 lukas staff 2912 13 Apr 17:09 ..
-rw-r--r-- 1 lukas staff 270 11 Apr 18:59 config.json
drwxr-xr-x 5 lukas staff 160 11 Apr 15:03 data
-rw-r--r-- 1 lukas staff 512241664 13 Apr 19:35 db.sqlite
-rw-r--r-- 1 lukas staff 65536 12 Apr 12:11 db.sqlite-shm
-rw-r--r-- 1 lukas staff 9603752 13 Apr 19:38 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 9 Apr 19:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 59116 13 Apr 19:37 screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano config.json
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
UW PICO 5.09 New Buffer
[ Read 378 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Pg ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where is ^V Next Pg ^U UnCut Text ^T To Spell
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T09:44:01+03:00",
"uptime": 1243.255541917,
"fps": 0.254975738544637,
"frames": 317
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-14T10:12:37+03:00",
"uptime": 2959.307842208,
"fps": 0.[CREDIT_CARD],
"frames": 929
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
887M /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
308M /Users/lukas/.screenpipe/data
561M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
18M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
32K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
392M /Users/lukas/.screenpipe/data
660M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
15M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
44K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
477M /Users/lukas/.screenpipe/data
770M /Users/lukas/.screenpipe/db.sqlite
64K /Users/lukas/.screenpipe/db.sqlite-shm
8.0M /Users/lukas/.screenpipe/db.sqlite-wal
24K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
60K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.2G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe
1.3G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
-zsh...
|
11939
|
|
11958
|
NULL
|
0
|
2026-04-14T10:40:48.673858+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163248673_m2.jpg...
|
Slack
|
Aneliya Angelova, Nikolay Yankov, Steliyan Georgie Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev (DM) - Jiminny Inc - Slack...
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.05486107},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.090972185},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.048611164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5328125,"top":1.0,"width":0.01171875,"height":-0.08124995},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.0958333},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.022265624,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.020703126,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.034375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.028515626,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"}]...
|
5064223888633797890
|
-1751664273797826039
|
visual_change
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Firefox)FileEditViewHistoryBookmarks)HelpPlatform Sprint 1 Q2 - Platform TeaJY-20543 add AJ reports User piloZ Configure SSH access to multipleConsole Home | Console Home | usSecurityGroup | EC2 |us-east-2JY-20543 add AJ reports User pilo5 SRD-6779 | JY-20632 | Unable toJy 19798 evaluation for ai activity(8) Jiminny7 Ask Jiminny test report - 8 Aor 201- Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc(x) Configure SSH access to multipleCa CloudWatch | us-east-2New Tab-a CloudWatch | us-east-2+ New TabProfilesToolsWindowdoo.clrcieci.com/oroemnes/crnuominnydoeo circleci •HomePipelinesProjectsDeploysInsightsRunnersOrgPlanEB All Pipelines / appappOverviewSettingsDeploys& All pipelines• appFipellneapp57249JOoSJobsappChunkJOOS8° All branches• Cutoff date -All statusesstatusWorkflow• Running15m 19s remain 0build_accept_deploycheckou-code 8o4v04build-frontend 869908test-frontend 869921oullc-oackeno 80--05phpstan 869907prepare_deploy_revision_stage 869909build docker backend code stage 869911build_docker_worker_code_stage 869912build_docker_worker_video_code_stage 869910db_migrations_stage 869913deploy_docker_backend_code_stage 869915sentry_notify 869916deploy_docker_worker_code_stage 869917cepov cocker worker viceo coce stade dov4deploy_frontend_assets_to_s3_stage 869918setup 869919Test oowy4utest-backend-lint 869906(8sonar_cloud 869922VSuccesssetup-workflow SETUPV setup 869894Running14m 20s remainoulc accer cepoveneckour-core dowewsf Support Daily • in 1h 20 m100% C2Manage triggersCheckout sourceJY-18909-automated-reports-ask-jiminnyb72153b JY-18909 fix test (urlccer eventPush Commit pushedStart7m agoTue 14 Apr 13:40:48®Trigger PipelineDisplay [EMAIL]-18909-automated-reports-ask-jiminnyb/2153b JY-18909 Tix testg Push Commit pushedauromare-ccrenea eo- ssues-txesPush Commit pushed18d091a Enhance Slack notification script and workflowTormo oveo channel cont curauon 4om ago8m agoDuration10m 16s1m 17s1m 34smiZs1m 35s42sno sos1m 54sIm 47S4m 4s4m 4smi'ls24s46s6m 30s4m 33s1m 1s59s11m 15sGGOS.GG@д.....
|
11939
|
|
11960
|
NULL
|
0
|
2026-04-14T10:40:50.096999+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163250096_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpDOCKER281DEV ( SlackFileEditViewGoHistoryWindowHelpDOCKER281DEV (docker)882APP (-zsh)*3ec2-user@ip-10-30-..887M/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json308M/Users/lukas/.screenpipe/data561M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm18M/Users/lukas/.screenpipe/db.sqlite-wal24K132K/Users/lukas/.screenpipe/pipes/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.1og72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log32K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.loglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json392M/Users/lukas/.screenpipe/data660M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm15M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K96K/Users/Lukas/.screenpipe/screenpipe.2026-04-09.0.10g/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log44K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.10glukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0Lukas®Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*4.0K/Users/lukas/.screenpipe/config.json477M/Users/lukas/.screenpipe/data770M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm8.0M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.10g72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log60K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.1oglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.3G/Users/Lukas/.screenpipeLukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $+EDHomeD-DMsActivityFilesLater.*•More, 0loholà Support Daily • in 1h 20 m100% CTue 14 Apr 13:40:49Search Jiminny IncJiminny ...& Starred8platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messages(3Aneliya Angelova, ...Ro Steliyan Georgiev3) Adelina Petrova, Ili...?. Adelina PetrovaO. Calva DimitravaAneliya Angelova, ...846 0• Messages+Add canvasзабавих се чесредипуснах и мина и fail-наима result но e failedToday ~ азикаха settings зазначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаNewNikolay Yankov 12:04 PMДа, там има 14 активитита, защо не сработитози пьт?Lukas Kovalik 12:05 PMпак изглежда sequenceгледам гоMessage AneliyagAngelova, Nikolay Yankov, Steli......
|
NULL
|
214751757041375592
|
NULL
|
visual_change
|
ocr
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpDOCKER281DEV ( SlackFileEditViewGoHistoryWindowHelpDOCKER281DEV (docker)882APP (-zsh)*3ec2-user@ip-10-30-..887M/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json308M/Users/lukas/.screenpipe/data561M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm18M/Users/lukas/.screenpipe/db.sqlite-wal24K132K/Users/lukas/.screenpipe/pipes/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.1og72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log32K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.loglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json392M/Users/lukas/.screenpipe/data660M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm15M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K96K/Users/Lukas/.screenpipe/screenpipe.2026-04-09.0.10g/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log44K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.10glukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0Lukas®Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*4.0K/Users/lukas/.screenpipe/config.json477M/Users/lukas/.screenpipe/data770M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm8.0M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.10g72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log60K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.1oglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.3G/Users/Lukas/.screenpipeLukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $+EDHomeD-DMsActivityFilesLater.*•More, 0loholà Support Daily • in 1h 20 m100% CTue 14 Apr 13:40:49Search Jiminny IncJiminny ...& Starred8platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messages(3Aneliya Angelova, ...Ro Steliyan Georgiev3) Adelina Petrova, Ili...?. Adelina PetrovaO. Calva DimitravaAneliya Angelova, ...846 0• Messages+Add canvasзабавих се чесредипуснах и мина и fail-наима result но e failedToday ~ азикаха settings зазначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаNewNikolay Yankov 12:04 PMДа, там има 14 активитита, защо не сработитози пьт?Lukas Kovalik 12:05 PMпак изглежда sequenceгледам гоMessage AneliyagAngelova, Nikolay Yankov, Steli......
|
NULL
|
|
11961
|
255
|
0
|
2026-04-14T10:41:19.418324+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163279418_m2.jpg...
|
Slack
|
Aneliya Angelova, Nikolay Yankov, Steliyan Georgie Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev (DM) - Jiminny Inc - Slack...
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov
Today at 10:41:03 AM
10:41 AM
можеш ли да я ръннеш ти командата
Lukas Kovalik
Today at 10:43:05 AM
10:43 AM
да
Nikolay Yankov
Today at 10:45:52 AM
10:45 AM
пиши кат оя ръннеш
Lukas Kovalik
Today at 10:52:52 AM
10:52 AM
забавих се че ми се разбазикаха settings за среди
Today at 10:53:07 AM
10:53
пуснах и мина и fail-на
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:53:20 AM
10:53
има result но е failed
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:08 AM
10:58
значи
REASON_NOT_ENOUGH_ACTIVITIES
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:57 AM
10:58
виж дали има нещо в OD със този филтър
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:01:28 AM
11:01 AM
Добре
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:39:27 AM
11:39 AM
я рънни пак
Lukas
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 11:43:00 AM
11:43 AM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:44:24 AM
11:44
същото
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:47:25 AM
11:47
Competitive pitches беше втория нали така
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
New
Nikolay Yankov
Today at 12:04:33 PM
12:04 PM
Да, там има 14 активитита, защо не сработи този път?
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 12:05:31 PM
12:05 PM
пак изглежда sequence
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 12:05:41 PM
12:05
гледам го
1 reaction, react with +1 emoji
1
Add reaction…
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
loading…
Nikolay Yankov is typing...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.05486107},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.090972185},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.048611164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5328125,"top":1.0,"width":0.01171875,"height":-0.08124995},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.0958333},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.022265624,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.020703126,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.034375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.028515626,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.64453125,"top":1.0,"width":0.036328126,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.65546876,"top":1.0,"width":0.022265624,"height":-0.087499976},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.6820313,"top":1.0,"width":0.040234376,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.6929687,"top":1.0,"width":0.026171874,"height":-0.087499976},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.7234375,"top":1.0,"width":0.012890625,"height":-0.079861164},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:11 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)","depth":25,"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:27 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"крон го пуска през нощ","depth":25,"role_description":"text"},{"role":"AXLink","text":"Today at 10:37:19 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:37","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"така че мануално пусни при тестване","depth":25,"role_description":"text"},{"role":"AXLink","text":"Today at 10:38:26 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:38","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме","depth":25,"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 10:41:03 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:41 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"можеш ли да я ръннеш ти командата","depth":25,"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 10:43:05 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:43 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"да","depth":25,"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 10:45:52 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:45 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"пиши кат оя ръннеш","depth":25,"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 10:52:52 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:52 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"забавих се че ми се разбазикаха settings за среди","depth":25,"role_description":"text"},{"role":"AXLink","text":"Today at 10:53:07 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:53","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"пуснах и мина и fail-на","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:53:20 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:53","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"има result но е failed","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:58:08 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:58","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"значи","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"REASON_NOT_ENOUGH_ACTIVITIES","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:58:57 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:58","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"виж дали има нещо в OD със този филтър","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 11:01:28 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:01 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Добре","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 11:39:27 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:39 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"я рънни пак","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Lukas","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 11:43:00 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:43 AM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 11:44:24 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:44","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"същото","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 11:47:25 AM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:47","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"Competitive pitches беше втория нали така","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"New","depth":22,"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 12:04:33 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:04 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Да, там има 14 активитита, защо не сработи този път?","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 12:05:31 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:05 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"пак изглежда sequence","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 12:05:41 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:05","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"гледам го","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"1 reaction, react with +1 emoji","depth":25,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"1","depth":26,"role_description":"text"},{"role":"AXButton","text":"Add reaction…","depth":25,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"","depth":23,"value":"","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"loading…","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov is typing","depth":11,"role_description":"text"}]...
|
-8149227495766218834
|
-1284909225140369072
|
idle
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov
Today at 10:41:03 AM
10:41 AM
можеш ли да я ръннеш ти командата
Lukas Kovalik
Today at 10:43:05 AM
10:43 AM
да
Nikolay Yankov
Today at 10:45:52 AM
10:45 AM
пиши кат оя ръннеш
Lukas Kovalik
Today at 10:52:52 AM
10:52 AM
забавих се че ми се разбазикаха settings за среди
Today at 10:53:07 AM
10:53
пуснах и мина и fail-на
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:53:20 AM
10:53
има result но е failed
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:08 AM
10:58
значи
REASON_NOT_ENOUGH_ACTIVITIES
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:57 AM
10:58
виж дали има нещо в OD със този филтър
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:01:28 AM
11:01 AM
Добре
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:39:27 AM
11:39 AM
я рънни пак
Lukas
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 11:43:00 AM
11:43 AM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:44:24 AM
11:44
същото
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:47:25 AM
11:47
Competitive pitches беше втория нали така
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
New
Nikolay Yankov
Today at 12:04:33 PM
12:04 PM
Да, там има 14 активитита, защо не сработи този път?
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 12:05:31 PM
12:05 PM
пак изглежда sequence
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 12:05:41 PM
12:05
гледам го
1 reaction, react with +1 emoji
1
Add reaction…
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
loading…
Nikolay Yankov is typing
Firefox)FileEditPlatform Sprint 1 Q2 - Platform TeaJY-20543 add AJ reports User piloZ Configure SSH access to multipleConsole Home | Console Home | usSecurityGroup | EC2 |us-east-2JY-20543 add AJ reports User pilo5 SRD-6779 | JY-20632 | Unable toJy 19798 evaluation for ai activity(8) Jiminny7 Ask Jiminny test report - 8 Aor 201- Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc(x) Configure SSH access to multipleCa CloudWatch | us-east-2New Tab-a CloudWatch | us-east-2+ New TabHistoryBookmarks)ProfilesToolsWindowHelpdoo.clrcieci.com/oroemnes/crnuominnydoeo circleci •HomePipelinesProjectsDeploysInsightsRunnersOrgPlanEB All Pipelines / 0doeappOverviewSettingsDeploys& All pipelines• appFipellneapp57249JOoSJobsappChunkJOOS8° All branches• Cutoff date -All statusesstatusWorkflow• Running14m 49s remain ®build_accept_deploycheckou-code 8o4v04build-frontend 869908test-frontend 869921oullc-oackeno 80--05phpstan 869907prepare_deploy_revision_stage 869909build docker backend code stage 869911build_docker_worker_code_stage 869912build_docker_worker_video_code_stage 869910db_migrations_stage 869913deploy_docker_backend_code_stage 869915sentry_notify 869916deploy_docker_worker_code_stage 869917cepov cocker worker viceo coce stade dov4deploy_frontend_assets_to_s3_stage 869918setup 869919Test oowy4utest-backend-lint 869906(8sonar_cloud 869922VSuccesssetup-workflow SETUPV setup 869894O Running13m 50s remain ®oulc accer cepoveneckour-core dowewsCheckout sourceJY-18909-automated-reports-ask-jiminnyb72153b JY-18909 fix test (urlccer eventPush Commit pushedloblSupport Daily - in 1h 19m100% C2Tue 14 Apr 13:41:18®Manage triggersTrigger PipelineDisplay optionsStartACtIOns7m [EMAIL]-18909-automated-reports-ask-jiminnyb/2153b JY-18909 Tix testg Push Commit pushedom ago8m agoDuration10m 46s1m 17s1m 34smiZs1m 35s42sno sos1m 54sIm 47S4m 34s4m 34Smi'ls24s46s4m 33s1m 1s59s11m [EMAIL]-ccrenea eo- ssues-txesPush Commit pushed18d091a Enhance Slack notification script and workflowTormo oveo channel cont curauon 4...
|
NULL
|
|
11962
|
254
|
0
|
2026-04-14T10:41:20.609502+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163280609_m1.jpg...
|
Slack
|
Aneliya Angelova, Nikolay Yankov, Steliyan Georgie Aneliya Angelova, Nikolay Yankov, Steliyan Georgiev (DM) - Jiminny Inc - Slack...
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov
Today at 10:41:03 AM
10:41 AM
можеш ли да я ръннеш ти командата
Lukas Kovalik
Today at 10:43:05 AM
10:43 AM
да
Nikolay Yankov
Today at 10:45:52 AM
10:45 AM
пиши кат оя ръннеш
Lukas Kovalik
Today at 10:52:52 AM
10:52 AM
забавих се че ми се разбазикаха settings за среди
Today at 10:53:07 AM
10:53
пуснах и мина и fail-на
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:53:20 AM
10:53
има result но е failed
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:08 AM
10:58
значи
REASON_NOT_ENOUGH_ACTIVITIES
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:57 AM
10:58
виж дали има нещо в OD със този филтър
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:01:28 AM
11:01 AM
Добре
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:39:27 AM
11:39 AM
я рънни пак
Lukas
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 11:43:00 AM
11:43 AM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:44:24 AM
11:44
същото
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:47:25 AM
11:47
Competitive pitches беше втория нали така
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
New
Nikolay Yankov
Today at 12:04:33 PM
12:04 PM
Да, там има 14 активитита, защо не сработи този път?
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 12:05:31 PM
12:05 PM
пак изглежда sequence
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 12:05:41 PM
12:05
гледам го
1 reaction, react with +1 emoji
1
Add reaction…
React with white_check_mark...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.4861111,"top":0.08777778,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.4861111,"top":0.14555556,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"bounds":{"left":0.4861111,"top":0.20333333,"width":0.022222223,"height":0.035555556},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.525,"top":0.07777778,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5326389,"top":0.13,"width":0.020833334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.525,"top":0.15333334,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"bounds":{"left":0.5347222,"top":0.20555556,"width":0.016666668,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"bounds":{"left":0.525,"top":0.22888888,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"bounds":{"left":0.52916664,"top":0.28111112,"width":0.027083334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"bounds":{"left":0.525,"top":0.30444443,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.5347222,"top":0.35666665,"width":0.015972223,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"bounds":{"left":0.525,"top":0.38,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"bounds":{"left":0.53402776,"top":0.43222222,"width":0.018055556,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"bounds":{"left":0.525,"top":0.45555556,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"bounds":{"left":0.53333336,"top":0.50777775,"width":0.01875,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.039583333,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.06111111,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.050694443,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.60625,"top":0.18222222,"width":0.093055554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.60625,"top":0.25555557,"width":0.046527777,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.60625,"top":0.28666666,"width":0.025694445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.60625,"top":0.31777778,"width":0.038194444,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.60625,"top":0.34888887,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.60625,"top":0.38,"width":0.057638887,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.60625,"top":0.41111112,"width":0.054166667,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.60625,"top":0.4422222,"width":0.04027778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.60625,"top":0.47333333,"width":0.034027778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.60625,"top":0.5044444,"width":0.061805554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"bounds":{"left":0.60625,"top":0.53555554,"width":0.05,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"bounds":{"left":0.60625,"top":0.56666666,"width":0.072916664,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"bounds":{"left":0.60625,"top":0.5977778,"width":0.08055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"bounds":{"left":0.60625,"top":0.6288889,"width":0.035416666,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"bounds":{"left":0.60625,"top":0.66,"width":0.038194444,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"bounds":{"left":0.60625,"top":0.6911111,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"bounds":{"left":0.60625,"top":0.7222222,"width":0.036111113,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"bounds":{"left":0.60625,"top":0.75333333,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"bounds":{"left":0.60625,"top":0.78444445,"width":0.094444446,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"bounds":{"left":0.60625,"top":0.8577778,"width":0.07847222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.68472224,"top":0.8577778,"width":0.013194445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68958336,"top":0.8577778,"width":0.029861111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"bounds":{"left":0.60625,"top":0.8888889,"width":0.07986111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.92,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.67777777,"top":0.92,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"bounds":{"left":0.68333334,"top":0.92,"width":0.015972223,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.95111114,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.9822222,"width":0.07361111,"height":0.012222222},"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.73125,"top":0.12777779,"width":0.06458333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.75069445,"top":0.14,"width":0.039583333,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.79791665,"top":0.12777779,"width":0.07152778,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.8173611,"top":0.14,"width":0.046527777,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.8715278,"top":0.12777779,"width":0.022916667,"height":0.04222222},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.83194447,"top":0.17666666,"width":0.05277778,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:11 AM","depth":24,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36 AM","depth":25,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.21111111,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:36:27 AM","depth":25,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:36","depth":26,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"крон го пуска през нощ","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.11319444,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:37:19 AM","depth":25,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:37","depth":26,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"така че мануално пусни при тестване","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.18055555,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:38:26 AM","depth":25,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:38","depth":26,"bounds":{"left":0.7375,"top":0.16111112,"width":0.021527778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.21527778,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.072222225,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.8361111,"top":0.16111112,"width":0.00625,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:41:03 AM","depth":24,"bounds":{"left":0.84166664,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:41 AM","depth":25,"bounds":{"left":0.84166664,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"можеш ли да я ръннеш ти командата","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.18055555,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:43:05 AM","depth":24,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:43 AM","depth":25,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"да","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.011805556,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.072222225,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.8361111,"top":0.16111112,"width":0.00625,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Today at 10:45:52 AM","depth":24,"bounds":{"left":0.84166664,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:45 AM","depth":25,"bounds":{"left":0.84166664,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"пиши кат оя ръннеш","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.099305555,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06458333,"height":0.015555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.16111112,"width":0.0055555557,"height":0.013333334},"role_description":"text"},{"role":"AXLink","text":"Today at 10:52:52 AM","depth":24,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.013333334},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:52 AM","depth":25,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.036805555,"height":0.013333334},"role_description":"text"},{"role":"AXStaticText","text":"забавих се че ми се разбазикаха settings за среди","depth":25,"bounds":{"left":0.76458335,"top":0.17888889,"width":0.20555556,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"Today at 10:53:07 AM","depth":25,"bounds":{"left":0.7375,"top":0.24,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:53","depth":26,"bounds":{"left":0.7375,"top":0.24,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"пуснах и мина и fail-на","depth":25,"bounds":{"left":0.76458335,"top":0.23666666,"width":0.108333334,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.20222223,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.20222223,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.20222223,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.20222223,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.20222223,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:53:20 AM","depth":25,"bounds":{"left":0.7375,"top":0.27333334,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:53","depth":26,"bounds":{"left":0.7375,"top":0.27333334,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"има result но е failed","depth":25,"bounds":{"left":0.76458335,"top":0.27,"width":0.097222224,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.23555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.23555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.23555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.23555556,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.23555556,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:58:08 AM","depth":25,"bounds":{"left":0.7375,"top":0.30666667,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:58","depth":26,"bounds":{"left":0.7375,"top":0.30666667,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"значи","depth":25,"bounds":{"left":0.76458335,"top":0.30333334,"width":0.027083334,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"REASON_NOT_ENOUGH_ACTIVITIES","depth":25,"bounds":{"left":0.7708333,"top":0.3422222,"width":0.14027777,"height":0.016666668},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.2688889,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.2688889,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.2688889,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.2688889,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.2688889,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 10:58:57 AM","depth":25,"bounds":{"left":0.7375,"top":0.3888889,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"10:58","depth":26,"bounds":{"left":0.7375,"top":0.3888889,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"виж дали има нещо в OD със този филтър","depth":25,"bounds":{"left":0.76458335,"top":0.38555557,"width":0.2048611,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.3511111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.3511111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.3511111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.3511111,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.3511111,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.76458335,"top":0.41666666,"width":0.072222225,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.8361111,"top":0.4188889,"width":0.00625,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 11:01:28 AM","depth":24,"bounds":{"left":0.84166664,"top":0.42222223,"width":0.036805555,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:01 AM","depth":25,"bounds":{"left":0.84166664,"top":0.42222223,"width":0.036805555,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"Добре","depth":25,"bounds":{"left":0.76458335,"top":0.44333333,"width":0.03125,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.39777777,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.39777777,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.39777777,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.39777777,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.39777777,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.76458335,"top":0.47444445,"width":0.072222225,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.8361111,"top":0.47666666,"width":0.00625,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 11:39:27 AM","depth":24,"bounds":{"left":0.84166664,"top":0.48,"width":0.036805555,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:39 AM","depth":25,"bounds":{"left":0.84166664,"top":0.48,"width":0.036805555,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"я рънни пак","depth":25,"bounds":{"left":0.76458335,"top":0.5011111,"width":0.059722222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Lukas","depth":25,"bounds":{"left":0.82361114,"top":0.5011111,"width":0.02638889,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.45555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.45555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.45555556,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.45555556,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.45555556,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.5322222,"width":0.06458333,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.53444445,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 11:43:00 AM","depth":24,"bounds":{"left":0.8347222,"top":0.5377778,"width":0.036805555,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:43 AM","depth":25,"bounds":{"left":0.8347222,"top":0.5377778,"width":0.036805555,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"bounds":{"left":0.76458335,"top":0.5588889,"width":0.031944446,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.5133333,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.5133333,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.5133333,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.5133333,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.5133333,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 11:44:24 AM","depth":25,"bounds":{"left":0.7375,"top":0.59555554,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:44","depth":26,"bounds":{"left":0.7375,"top":0.59555554,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"същото","depth":25,"bounds":{"left":0.76458335,"top":0.5922222,"width":0.036805555,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.55777776,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.55777776,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.55777776,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.55777776,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.55777776,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 11:47:25 AM","depth":25,"bounds":{"left":0.7375,"top":0.6288889,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:47","depth":26,"bounds":{"left":0.7375,"top":0.6288889,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"Competitive pitches беше втория нали така","depth":25,"bounds":{"left":0.76458335,"top":0.6255556,"width":0.20555556,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.5911111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.5911111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.5911111,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.5911111,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.5911111,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"New","depth":22,"bounds":{"left":0.96458334,"top":0.6433333,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXButton","text":"Nikolay Yankov","depth":24,"bounds":{"left":0.76458335,"top":0.6566667,"width":0.072222225,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.8361111,"top":0.6588889,"width":0.00625,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 12:04:33 PM","depth":24,"bounds":{"left":0.84166664,"top":0.6622222,"width":0.036805555,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:04 PM","depth":25,"bounds":{"left":0.84166664,"top":0.6622222,"width":0.036805555,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"Да, там има 14 активитита, защо не сработи този път?","depth":25,"bounds":{"left":0.76458335,"top":0.68333334,"width":0.21527778,"height":0.044444446},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.6377778,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.6377778,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.6377778,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.6377778,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.6377778,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.73888886,"width":0.06458333,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.7411111,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 12:05:31 PM","depth":24,"bounds":{"left":0.8347222,"top":0.74444443,"width":0.036111113,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:05 PM","depth":25,"bounds":{"left":0.8347222,"top":0.74444443,"width":0.036111113,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"пак изглежда sequence","depth":25,"bounds":{"left":0.76458335,"top":0.76555556,"width":0.11111111,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.72,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.72,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.72,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.72,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.72,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 12:05:41 PM","depth":25,"bounds":{"left":0.7375,"top":0.80222225,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:05","depth":26,"bounds":{"left":0.7375,"top":0.80222225,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"гледам го","depth":25,"bounds":{"left":0.76458335,"top":0.79888886,"width":0.047222223,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"1 reaction, react with +1 emoji","depth":25,"bounds":{"left":0.76458335,"top":0.82555556,"width":0.029861111,"height":0.026666667},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"1","depth":26,"bounds":{"left":0.78402776,"top":0.83111113,"width":0.0048611113,"height":0.015555556},"role_description":"text"},{"role":"AXButton","text":"Add reaction…","depth":25,"bounds":{"left":0.7972222,"top":0.82555556,"width":0.023611112,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.7644445,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1649131769330247683
|
-1284909225140369072
|
idle
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Lukas Kovalik
Today at 10:36:11 AM
10:36 AM
това ще гледа всичко applicable за днес (ако не понедлник или начало на месец е само daily)
Today at 10:36:27 AM
10:36
крон го пуска през нощ
Today at 10:37:19 AM
10:37
така че мануално пусни при тестване
Today at 10:38:26 AM
10:38
ако трябва да тестваме други репорти може да променя команда за тестване да приема параметър за report template и д си пускаме определен когато тестваме
Nikolay Yankov
Today at 10:41:03 AM
10:41 AM
можеш ли да я ръннеш ти командата
Lukas Kovalik
Today at 10:43:05 AM
10:43 AM
да
Nikolay Yankov
Today at 10:45:52 AM
10:45 AM
пиши кат оя ръннеш
Lukas Kovalik
Today at 10:52:52 AM
10:52 AM
забавих се че ми се разбазикаха settings за среди
Today at 10:53:07 AM
10:53
пуснах и мина и fail-на
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:53:20 AM
10:53
има result но е failed
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:08 AM
10:58
значи
REASON_NOT_ENOUGH_ACTIVITIES
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 10:58:57 AM
10:58
виж дали има нещо в OD със този филтър
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:01:28 AM
11:01 AM
Добре
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Nikolay Yankov
Today at 11:39:27 AM
11:39 AM
я рънни пак
Lukas
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 11:43:00 AM
11:43 AM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:44:24 AM
11:44
същото
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:47:25 AM
11:47
Competitive pitches беше втория нали така
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
New
Nikolay Yankov
Today at 12:04:33 PM
12:04 PM
Да, там има 14 активитита, защо не сработи този път?
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Today at 12:05:31 PM
12:05 PM
пак изглежда sequence
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 12:05:41 PM
12:05
гледам го
1 reaction, react with +1 emoji
1
Add reaction…
React with white_check_mark
SlackFileEditViewGoHistoryWindowHelpDOCKER0 81DEV (docker)882APP (-zsh)*3ec2-user@ip-10-30-..887M/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json308M/Users/lukas/.screenpipe/data561M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm18M/Users/lukas/.screenpipe/db.sqlite-wal24K132K/Users/lukas/.screenpipe/pipes/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.1og72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log32K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.loglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $du -sh ~/.screenpipe/4.0K/Users/lukas/.screenpipe/config.json392M/Users/lukas/.screenpipe/data660M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm15M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K96K/Users/Lukas/.screenpipe/screenpipe.2026-04-09.0.10g/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log44K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.10glukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ nano screenpipe.2026-04-13.0Lukas®Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe/*4.0K/Users/lukas/.screenpipe/config.json477M/Users/lukas/.screenpipe/data770M/Users/lukas/.screenpipe/db.sqlite64K/Users/lukas/.screenpipe/db.sqlite-shm8.0M/Users/lukas/.screenpipe/db.sqlite-wal24K/Users/lukas/.screenpipe/pipes132K/Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log96K/Users/lukas/.screenpipe/screenpipe.2026-04-11.0.10g72K/Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log72K/Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log60K/Users/lukas/.screenpipe/screenpipe.2026-04-14.0.1oglukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.2G/Users/lukas/.screenpipelukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ du -sh ~/.screenpipe1.3G/Users/Lukas/.screenpipeLukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $+EDHomeD-DMsActivityFilesLater.*•MoreJiminny ...& Starredplatform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messages(3Aneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...?. Adelina PetrovaO. Calva Dimitrava§ Support Daily - in 1h 19 m100% CTue 14 Apr 13:41:20Search Jiminny IncAneliya Angelova, ...846 0• MessagesAdd canvas+забавих се чесредипуснах и мина и fail-наToday ~ азикаха settings заима result но e failedзначиREASON_NOT_ENOUGH_ACTIVITIESвиж дали има нещо в OD със този филтьрNikolay Yankov 11:01 AMДобреNikolay Yankov 11:39 AMя рьнни пак LukasLukas Kovalik 11:43 AMготовосьщотоCompetitive pitches беше втория нали такаNewNikolay Yankov 12:04 PMДа, там има 14 активитита, защо не сработитози пьт?Lukas Kovalik 12:05 PMпак изглежда sequenceгледам гоMessage AneliyagAngelova, Nikolay Yankov, Steli...Аa...
|
11960
|
|
11989
|
NULL
|
0
|
2026-04-14T10:45:42.409515+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163542409_m1.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.004166667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.12291667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.12708333,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.24583334,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.25,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.36875,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.37291667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.49166667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.49583334,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.6145833,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.61875,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.7375,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.7416667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.86041665,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.8645833,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.9548611,"top":0.032222223,"width":0.03888889,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.4298611,"top":0.033333335,"width":0.13958333,"height":0.017777778},"role_description":"text"}]...
|
4887378729928003354
|
-1176953275665420398
|
visual_change
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
NULL
|
|
11990
|
NULL
|
0
|
2026-04-14T10:45:53.492802+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163553492_m2.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.23320313,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.23554687,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.30234376,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3046875,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.37148437,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3738281,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.440625,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.44296876,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.5097656,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.5121094,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.57890624,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.58125,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.64804685,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.6503906,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.7171875,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.71953124,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.7703125,"top":1.0,"width":0.021875,"height":-0.02013886},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.475,"top":1.0,"width":0.07851563,"height":-0.020833373},"role_description":"text"}]...
|
-260733296184018342
|
-1176953275732531310
|
visual_change
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
NULL
|
|
11991
|
257
|
0
|
2026-04-14T10:45:55.650068+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163555650_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormViewNavigateCodelaravellRefactonWindowFV f PhpStormViewNavigateCodelaravellRefactonWindowFV faVsco.js v• #1894 on .lY-18909-automated-renorts-ask-liminnv vProject v(©) ReportController.phpC JiminnyDebugCommand.phpC AutomatedReportsCommand.phputomatedRevor ssendCommane.ono© AddLayoutEntities.php• _ RepositoryC Team.php© AutomatedReportsRepository.pnpC)AutomatedReportsCommandTest.phpAulomaleakeporisservice.onovIOnDemandActivitvSear© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© Criteria.php(©) AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.phpkequestoeneralekeportoo.ongc) Automated Revorkesult.ong© IranscriptionKeywordP:_leamsettingspnp neoers.ond(C InitialFrontendState.ohp© Jiminny.php(C) Plan.php(©) Serializer.phpC TeamScimDetails.php_ bootstrapW buildW config_ contribcaraoaseM docs> M front-end> Mlana>node modules library root› _ phpstan> publicD resources> CroutesW scriptsv D storage•Dapp> M debugbar> M frameworkv Mloas.gitignore• audio.wav= custom.100= hubspot-journal-poll.log= laravel.log<» phpunit.xm.os ttt.js= oauth-private.key= oauth-public.key= storageE supervisord.pidlu text-relay. sonv _tests> → Feature> D Integration› _ ServicesUnit>J Actions> Component> D Configurationv M Consolev commanos› MActivities› Crm› Elasticsearchv _ ReportsC AutomatedReport.phpvoctiunettreneruin corudoerB14 V6use Psr\LognLoggerincertace,use ovimony Lonponent console nour noucintertacer22 Mclass Aucomaceareporcsconmanarest excenas lescuase310>45 0'>52 >74 %>1100101 M >1140129 % >152 % >179180 M205206 M )12401241 M >269270 M >1309310 % >3261S4.5115441355356(c) AutomatedReport(c) ImportUsersFromCsi>D Contracts12 usagesprivate LoggerInterface&Mockery MockInterface $Logger;12 usagesprivate DispatcherxMockery Mockinterface Sdispatcher:24 usagesprivace Automacedкeporuskepos1сoryхмоскегу москіnсеrтаcе фгерогскеробісогу:3 usagesprivace inpucincertacednockobyeet aaapurt¾usadesprivate OutputStyLe&Mock0bject Soutput;1s usacesprivate AutomatedReportsCommand Scommand;protected function setUp(): void{...}protected function tearDown(): void{...}public function testProcessDailyReportsEveryDay(): void{...}public function testDispatchesAskJiminnyJobForAskJiminnyReports(: voidf...}public function testProcessWeekLyReportsOnMondayO: void...public function testDoNotProcessWeeklyReports0nNonMondayO: voidi...hpublic function testProcessMonthlyReports0nFirstDay0fMonth(): void{...}public function testDoNotProcessMonthlyReports0nNonFirstDay0fMonth(): void{...}public function testProcessQuarterlyReports0nFirstDay0fQuarterlyMonth: voidt...}public function testDoNotProcessOuarterlyReports0nNonOuarterlyFirstDavO: void...;public function testProcessALlFrequencies0nMondayFirstDay0fQuarterlyMonthO: void...hpublic function testreturnszero0nsuccess: vo1di...17 usagesprivate function createStandardReports(string $frequency, int $count): array{...}private function createAskJiminnyReport(string $frequency): mixedt...= custom.log= laravel.log XL SF (iminny@localhost≤ HS_local fiminny@localhost#concole DPOlbIC AskJiminnyReportActivityService.phpAcuivlysearch.ongC) OnDenCriteria.php(Ch AskJiminnyReportActivityServiceTest.phg8850•EEMNС C A2026-04-14 10.4519717070-04-14117070-04-14 70.4997LocaL.INFU: Jiminny Console\ComLOcoL.N-U[HubSpot Journal Polling]LOcoL.N-U[HubSpot Journal Co12020-04-14110:45:57LoCaL. INFU.HubSpot Journal Pollina12026-04-14 10:45:371LoceL. NeU.HubSpot Journal Pollina12026-04-14 10:45:371Zocal.INF0: HubSpot Journal Pollinal2026-04-14 10:45:37Local.INFO: HubSpot Journal API]I2026-04-14 10:45:37Local.INFO: Jiminny (Console\Co2026-04-14 10:45:37local.INFO: HubSpot Journal Polling No12026-04-14 10:45:39JLocaL. INFO: Jimanny Console \Commands (Command::run Memory usage before starting comr12026-04-14 10:45:39JLocal.INFU: Dispatching activity sync Job 1"1mport_1d":810051,"provider12026-04-14 10:45:39 Local.INFO: Dispatching activity sync[2026-04-14 10:45:39] local.INF0: Dispatching activity sync17070-04-14110:45:5%Jlocal.INFO: Dispatching activity sync2020-04-14 10:45157Zocal.INF0: Dispatching activity12020-04-14 10:45.571Zocal.INF0: Dispatching activity14020-04-14 10.49.97[2026-04-14 10:45:401local. INFO: Jiminny \Console\Commands \Command::run Memory usage for commlocal.WARNING:Salesforcel2026-04-14 10:45:402026-04-14 10:45:40Local.INFO: CrmOwnerResolLocal.INFO: [CrmOwnerResolver] No team members found with active crm connection {"crm_provider":"salesforce" "team idL2026-04-14 10:45:40.local.INFO: LCrmOwnerResolver] No team member found with active crm connection 1"crm_provider":"salesforce", "team_id"12026-04-14 10:45:40.Local.ALERT: [SyncActiv1ty. Falled 1"1mport_1d":810051,"provider":"tw1l10-flex","provider_1d":317,l12026-04-14 10:45:40.acat TNEO"LSoc1aLAccountService Fetching token 1"soclalAccountld":1173,"provider":"salesforce",12026-04-14 10:45:491LocaL. INFO.LSoc1aLAccountServiceJ Token retrieved 1"soclalAccountid"17070-04-14 70-45-49117070-04-14 70-49.40LOcol.N-ULencrypcedlokenranagery benerating access coken.LOCOL.ALZKIA[SvncActivitvl Failed f"imoort id"•810052 "orovide10"4"08 44515-0705-400e-1"team id":12020-04-14 10.45.41LOCOL. INFU.[SocialAccountServicel Fetching token {"socialAccorelation id":i12026-04-14 10:45:411Zocal. INF0:SocialAccountServicel Token retrieved {"socialAccountId"correlation id":12026-04-14 10:45:411Zocal.INF0: EncryptedTokenManager Generating access token.• "757dc2a1-12d4-40ee-i2026-04-14 10:45:41.Local.INFO: Jiminny \Console\Commands\Command::run Memory usage before2026-04-14 10:45:41]Local.INFO: Jiminny (Console \Commands \Command::run Memory usage for command2026-04-14 10:45:42 local.ALERT: SyncActivity Failed "import_ id":810053,"provider":"apollo"nd": "crm:bullhorn:ping",12096-94-14199459442LocaL.INFU: LSoc1aLAccountServiceJ Fetching token 1"soc1alAccountld":12926-94-1410.45942ocal TNEO"LSoc1aLAccountServiceJ Token retrieved 1"soclalAccountL2026-04-14 10:45:42) local.INFU: LEncryptedtokenManager Generating access token17070-04-1 41LOCOL.ALZK[SyncActivity] Failed {"import_id":81005417070-04-1 41Locolt.NFU[SocialAccountServicel Fetching token 1"soc[2026-04-14 10:45:421LOCOL. INFU.[SocialAccountServicel Token retrieved {"{"correlation id":12026-04-14 10:45:421Zocal.INF0: EncryptedTokenManager] Generating access token.12026-04-14 10:45:421Zocal.INF0: HubSpot Journal Pollingl Getting offset from database {"offrelation id"."5c312aca-f468-4b29-:jiminny team id".n} {"correlation idi[2026-04-14 10:45:42]local.INF0: HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/lai2026-04-14 10:45:42Local.INFO: HubSpot Journal Polling. No data"trace_ id":"co2026-04-14 10:45:43Jlocal.ALERT: SyncActivity Failed "import_ id":810055,"provider12026-04-14 10:45:43.local.INFO: [SocialAccountService Fetching token 1"socialAccountId":1499,"provider':"hubspot"s 1"correlation_id":"8b112096-94-1419459445acat TNEO"2026-04-14 10:45:45LOCaL.INFO"LSoc1aLAccountService) Token retrieved 1"soclalAccountId":1499,"provideшhsnotis c"conralation 101.181[EncryptedTokenManager] Generating access token. {"mode":"Zegacy"} {"correlation 10":[CREDIT_CARD]-22026-04-14 10:45:45LocaL.INFO"ermownerResolver Intecration owner matched as CR- owner17070-04-14104545Locolt.NFUsoca Accountserv cel rerchind token *"socalaccountlo"4do."orovlden""nuosoor"r *"correlau on lo"t"dol12020-04-1410:45.45LOCOL. INFU.[SocialAccountServicel Token needs refreshing {"socialAccountId":408 "providen"."hubspot"? {"correlation i2020-04-14 10:45.45LoCaL. INFU.EncryptedTokenManager] Generating access token. {"mode"."Zeqacy"? {"correlation id"."8b18b541-c388-4dd8-§12026-04-14 10:45:431Zocal. INF0:SocialAccountServicel Refreshing token from provider {"socialAccountId":408."provider"."hubspot" "refres"[2026-04-14 10:45:431Zocal. INF0:SocialAccountObserver] Savina model{"correlation id"."8b18b541-c388-4dd8-85c3-3bc4402251c1" "trace id":Local.INFO: SocialAccountObserver Access token was modified, encryp# 1 file committed2026-04-14 10:45:431Local.INFO: Jiminny (ConsoLe \Commands \Command:: run Memory usage before2026-04-14 10:45:431Local.INFO: Jiminny Console Commands Command::run Memory usage for coTocal TNE0• [SocialAccountServicel Token nefreshed fisocialAccountTd"JY-18909 fix tesEdit Commit Message…2:1f 4 space:...
|
NULL
|
-1829360288405968505
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormViewNavigateCodelaravellRefactonWindowFV f PhpStormViewNavigateCodelaravellRefactonWindowFV faVsco.js v• #1894 on .lY-18909-automated-renorts-ask-liminnv vProject v(©) ReportController.phpC JiminnyDebugCommand.phpC AutomatedReportsCommand.phputomatedRevor ssendCommane.ono© AddLayoutEntities.php• _ RepositoryC Team.php© AutomatedReportsRepository.pnpC)AutomatedReportsCommandTest.phpAulomaleakeporisservice.onovIOnDemandActivitvSear© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© Criteria.php(©) AutomatedReportsCallbackService.phpC RequestGenerateAskJiminnyReportJob.phpkequestoeneralekeportoo.ongc) Automated Revorkesult.ong© IranscriptionKeywordP:_leamsettingspnp neoers.ond(C InitialFrontendState.ohp© Jiminny.php(C) Plan.php(©) Serializer.phpC TeamScimDetails.php_ bootstrapW buildW config_ contribcaraoaseM docs> M front-end> Mlana>node modules library root› _ phpstan> publicD resources> CroutesW scriptsv D storage•Dapp> M debugbar> M frameworkv Mloas.gitignore• audio.wav= custom.100= hubspot-journal-poll.log= laravel.log<» phpunit.xm.os ttt.js= oauth-private.key= oauth-public.key= storageE supervisord.pidlu text-relay. sonv _tests> → Feature> D Integration› _ ServicesUnit>J Actions> Component> D Configurationv M Consolev commanos› MActivities› Crm› Elasticsearchv _ ReportsC AutomatedReport.phpvoctiunettreneruin corudoerB14 V6use Psr\LognLoggerincertace,use ovimony Lonponent console nour noucintertacer22 Mclass Aucomaceareporcsconmanarest excenas lescuase310>45 0'>52 >74 %>1100101 M >1140129 % >152 % >179180 M205206 M )12401241 M >269270 M >1309310 % >3261S4.5115441355356(c) AutomatedReport(c) ImportUsersFromCsi>D Contracts12 usagesprivate LoggerInterface&Mockery MockInterface $Logger;12 usagesprivate DispatcherxMockery Mockinterface Sdispatcher:24 usagesprivace Automacedкeporuskepos1сoryхмоскегу москіnсеrтаcе фгерогскеробісогу:3 usagesprivace inpucincertacednockobyeet aaapurt¾usadesprivate OutputStyLe&Mock0bject Soutput;1s usacesprivate AutomatedReportsCommand Scommand;protected function setUp(): void{...}protected function tearDown(): void{...}public function testProcessDailyReportsEveryDay(): void{...}public function testDispatchesAskJiminnyJobForAskJiminnyReports(: voidf...}public function testProcessWeekLyReportsOnMondayO: void...public function testDoNotProcessWeeklyReports0nNonMondayO: voidi...hpublic function testProcessMonthlyReports0nFirstDay0fMonth(): void{...}public function testDoNotProcessMonthlyReports0nNonFirstDay0fMonth(): void{...}public function testProcessQuarterlyReports0nFirstDay0fQuarterlyMonth: voidt...}public function testDoNotProcessOuarterlyReports0nNonOuarterlyFirstDavO: void...;public function testProcessALlFrequencies0nMondayFirstDay0fQuarterlyMonthO: void...hpublic function testreturnszero0nsuccess: vo1di...17 usagesprivate function createStandardReports(string $frequency, int $count): array{...}private function createAskJiminnyReport(string $frequency): mixedt...= custom.log= laravel.log XL SF (iminny@localhost≤ HS_local fiminny@localhost#concole DPOlbIC AskJiminnyReportActivityService.phpAcuivlysearch.ongC) OnDenCriteria.php(Ch AskJiminnyReportActivityServiceTest.phg8850•EEMNС C A2026-04-14 10.4519717070-04-14117070-04-14 70.4997LocaL.INFU: Jiminny Console\ComLOcoL.N-U[HubSpot Journal Polling]LOcoL.N-U[HubSpot Journal Co12020-04-14110:45:57LoCaL. INFU.HubSpot Journal Pollina12026-04-14 10:45:371LoceL. NeU.HubSpot Journal Pollina12026-04-14 10:45:371Zocal.INF0: HubSpot Journal Pollinal2026-04-14 10:45:37Local.INFO: HubSpot Journal API]I2026-04-14 10:45:37Local.INFO: Jiminny (Console\Co2026-04-14 10:45:37local.INFO: HubSpot Journal Polling No12026-04-14 10:45:39JLocaL. INFO: Jimanny Console \Commands (Command::run Memory usage before starting comr12026-04-14 10:45:39JLocal.INFU: Dispatching activity sync Job 1"1mport_1d":810051,"provider12026-04-14 10:45:39 Local.INFO: Dispatching activity sync[2026-04-14 10:45:39] local.INF0: Dispatching activity sync17070-04-14110:45:5%Jlocal.INFO: Dispatching activity sync2020-04-14 10:45157Zocal.INF0: Dispatching activity12020-04-14 10:45.571Zocal.INF0: Dispatching activity14020-04-14 10.49.97[2026-04-14 10:45:401local. INFO: Jiminny \Console\Commands \Command::run Memory usage for commlocal.WARNING:Salesforcel2026-04-14 10:45:402026-04-14 10:45:40Local.INFO: CrmOwnerResolLocal.INFO: [CrmOwnerResolver] No team members found with active crm connection {"crm_provider":"salesforce" "team idL2026-04-14 10:45:40.local.INFO: LCrmOwnerResolver] No team member found with active crm connection 1"crm_provider":"salesforce", "team_id"12026-04-14 10:45:40.Local.ALERT: [SyncActiv1ty. Falled 1"1mport_1d":810051,"provider":"tw1l10-flex","provider_1d":317,l12026-04-14 10:45:40.acat TNEO"LSoc1aLAccountService Fetching token 1"soclalAccountld":1173,"provider":"salesforce",12026-04-14 10:45:491LocaL. INFO.LSoc1aLAccountServiceJ Token retrieved 1"soclalAccountid"17070-04-14 70-45-49117070-04-14 70-49.40LOcol.N-ULencrypcedlokenranagery benerating access coken.LOCOL.ALZKIA[SvncActivitvl Failed f"imoort id"•810052 "orovide10"4"08 44515-0705-400e-1"team id":12020-04-14 10.45.41LOCOL. INFU.[SocialAccountServicel Fetching token {"socialAccorelation id":i12026-04-14 10:45:411Zocal. INF0:SocialAccountServicel Token retrieved {"socialAccountId"correlation id":12026-04-14 10:45:411Zocal.INF0: EncryptedTokenManager Generating access token.• "757dc2a1-12d4-40ee-i2026-04-14 10:45:41.Local.INFO: Jiminny \Console\Commands\Command::run Memory usage before2026-04-14 10:45:41]Local.INFO: Jiminny (Console \Commands \Command::run Memory usage for command2026-04-14 10:45:42 local.ALERT: SyncActivity Failed "import_ id":810053,"provider":"apollo"nd": "crm:bullhorn:ping",12096-94-14199459442LocaL.INFU: LSoc1aLAccountServiceJ Fetching token 1"soc1alAccountld":12926-94-1410.45942ocal TNEO"LSoc1aLAccountServiceJ Token retrieved 1"soclalAccountL2026-04-14 10:45:42) local.INFU: LEncryptedtokenManager Generating access token17070-04-1 41LOCOL.ALZK[SyncActivity] Failed {"import_id":81005417070-04-1 41Locolt.NFU[SocialAccountServicel Fetching token 1"soc[2026-04-14 10:45:421LOCOL. INFU.[SocialAccountServicel Token retrieved {"{"correlation id":12026-04-14 10:45:421Zocal.INF0: EncryptedTokenManager] Generating access token.12026-04-14 10:45:421Zocal.INF0: HubSpot Journal Pollingl Getting offset from database {"offrelation id"."5c312aca-f468-4b29-:jiminny team id".n} {"correlation idi[2026-04-14 10:45:42]local.INF0: HubSpot Journal API] Fetching latest journal entry {"url":"https://api.hubapi.com/webhooks/v4/journal/lai2026-04-14 10:45:42Local.INFO: HubSpot Journal Polling. No data"trace_ id":"co2026-04-14 10:45:43Jlocal.ALERT: SyncActivity Failed "import_ id":810055,"provider12026-04-14 10:45:43.local.INFO: [SocialAccountService Fetching token 1"socialAccountId":1499,"provider':"hubspot"s 1"correlation_id":"8b112096-94-1419459445acat TNEO"2026-04-14 10:45:45LOCaL.INFO"LSoc1aLAccountService) Token retrieved 1"soclalAccountId":1499,"provideшhsnotis c"conralation 101.181[EncryptedTokenManager] Generating access token. {"mode":"Zegacy"} {"correlation 10":[CREDIT_CARD]-22026-04-14 10:45:45LocaL.INFO"ermownerResolver Intecration owner matched as CR- owner17070-04-14104545Locolt.NFUsoca Accountserv cel rerchind token *"socalaccountlo"4do."orovlden""nuosoor"r *"correlau on lo"t"dol12020-04-1410:45.45LOCOL. INFU.[SocialAccountServicel Token needs refreshing {"socialAccountId":408 "providen"."hubspot"? {"correlation i2020-04-14 10:45.45LoCaL. INFU.EncryptedTokenManager] Generating access token. {"mode"."Zeqacy"? {"correlation id"."8b18b541-c388-4dd8-§12026-04-14 10:45:431Zocal. INF0:SocialAccountServicel Refreshing token from provider {"socialAccountId":408."provider"."hubspot" "refres"[2026-04-14 10:45:431Zocal. INF0:SocialAccountObserver] Savina model{"correlation id"."8b18b541-c388-4dd8-85c3-3bc4402251c1" "trace id":Local.INFO: SocialAccountObserver Access token was modified, encryp# 1 file committed2026-04-14 10:45:431Local.INFO: Jiminny (ConsoLe \Commands \Command:: run Memory usage before2026-04-14 10:45:431Local.INFO: Jiminny Console Commands Command::run Memory usage for coTocal TNE0• [SocialAccountServicel Token nefreshed fisocialAccountTd"JY-18909 fix tesEdit Commit Message…2:1f 4 space:...
|
11990
|
|
11992
|
256
|
0
|
2026-04-14T10:45:55.600896+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163555600_m1.jpg...
|
PhpStorm
|
faVsco.js – console [STAGING]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp‹→0.lahl§ Support Daily • in 1h 15 m100% C8Tue 14 Apr 13:45:55ec2-user@ip-10-30-93-249:~DOCKER2- 881DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-... *4-zsh885-zsh86-zsh-87[2026-04-14 07:48:51]staging.INF0:[automated-reports]Checkingconditions {"isMonday":false,"isFirstDay0fMonth" :false, "currentMonth":4, "isQuarterlyMonth" : true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" :"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}L81* Unable to acce... *,- 88{"correlation_[2026-04-14 07:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:51]c-8954-5fblecfded81"}staging.INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" :1, "frequency": "daily","type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-1407:48:51]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-1407:48:51] staging.INFO: [automated-reports]Completed{"correlation_id": "4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-1408:41:03]staging. INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-1408:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Found 3 daily reports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId" : 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})"teamId" :1,"frequency" :"[2026-04-14 08:41:04]staging.INFO:[automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency".daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-cle12a4c4cf8""trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jiminny && bash"root@c78a087b1345:/home/jiminny#phpartisanautomated-reports...
|
NULL
|
3630154271508956921
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp‹→0.lahl§ Support Daily • in 1h 15 m100% C8Tue 14 Apr 13:45:55ec2-user@ip-10-30-93-249:~DOCKER2- 881DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-... *4-zsh885-zsh86-zsh-87[2026-04-14 07:48:51]staging.INF0:[automated-reports]Checkingconditions {"isMonday":false,"isFirstDay0fMonth" :false, "currentMonth":4, "isQuarterlyMonth" : true}id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id" :"bfe6b131-e3ad-4cfc-8954-5fblecfded81"}L81* Unable to acce... *,- 88{"correlation_[2026-04-14 07:48:51]fblecfded81"}staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5[2026-04-14 07:48:51]c-8954-5fblecfded81"}staging.INFO: [automated-reports]Found 2 daily reports to process{"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id":"bfe6b131-e3ad-4cf[2026-04-14 07:48:51]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" :1, "frequency": "daily","type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-1407:48:51]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}[2026-04-1407:48:51] staging.INFO: [automated-reports]Completed{"correlation_id": "4c37ea47-eebd-4122-8c35-9d6b9d707beb", "trace_id": "bfe6b131-e3ad-4cfc-8954-5fblecfded81"}root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@73b64f5d54a3:/home/jiminny# php artisan automated-reports[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started{"correlation_id": "c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-1408:41:03]staging. INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-1408:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:03]staging.INFO: [automated-reports]Found 3 daily reports to process7-b5b7-b6abfc67e02f"}{"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9".,"teamId" : 1, "frequency":"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id" : "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})[2026-04-14 08:41:03Jstaging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054"daily", "type": "ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8", "trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"})"teamId" :1,"frequency" :"[2026-04-14 08:41:04]staging.INFO:[automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId" :1, "frequency".daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8"',"trace_id": "94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-cle12a4c4cf8""trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jiminny && bash"root@c78a087b1345:/home/jiminny#phpartisanautomated-reports...
|
11989
|
|
12081
|
NULL
|
0
|
2026-04-14T10:50:58.879999+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163858879_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports {"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-_fiminny"') ("correlation-id : 5c2se861-2ca9-4h32-9f62-1736be80ca *[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started {"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}[automated-reports] Automated reportfound Test 6[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+la6lJiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...P. Adelina PetrovaO. Calva DimitravaSupport Daily - in 1h 10 m100% 147Tue 14 Apr 13:50:58Search Jiminny IncAneliya Angelova, ...84MessagesAdd canvas@ Files+гледам го* 1Today ~Lukas Kovalik 1:47 PMок готово, оправх го, и тоз път мина успешно291Nikolay Yankov 1:49 PMДобре, 2 неща:• в името на генерирания репорт е датавчера, не днес• и имейл не дойдеimage.png• а вTimeZone на моя user e SofiaLukas Kovalik 1:50 PMсмених и команда сега може да се пуска исъс id или uuid na report като --report-id ...Message Aneliya Angelova, Nikolay Yankov, Steli...Aa...
|
NULL
|
-503191901854934704
|
NULL
|
click
|
ocr
|
NULL
|
SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports {"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-_fiminny"') ("correlation-id : 5c2se861-2ca9-4h32-9f62-1736be80ca *[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started {"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}[automated-reports] Automated reportfound Test 6[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+la6lJiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...P. Adelina PetrovaO. Calva DimitravaSupport Daily - in 1h 10 m100% 147Tue 14 Apr 13:50:58Search Jiminny IncAneliya Angelova, ...84MessagesAdd canvas@ Files+гледам го* 1Today ~Lukas Kovalik 1:47 PMок готово, оправх го, и тоз път мина успешно291Nikolay Yankov 1:49 PMДобре, 2 неща:• в името на генерирания репорт е датавчера, не днес• и имейл не дойдеimage.png• а вTimeZone на моя user e SofiaLukas Kovalik 1:50 PMсмених и команда сега може да се пуска исъс id или uuid na report като --report-id ...Message Aneliya Angelova, Nikolay Yankov, Steli...Aa...
|
12078
|
|
12082
|
NULL
|
0
|
2026-04-14T10:50:58.802581+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163858802_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportResult.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8043719072324535154
|
-8628527368849355612
|
visual_change
|
hybrid
|
NULL
|
Project: faVsco.js, menu
PhpStormFileEditViewNavig Project: faVsco.js, menu
PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js#11894 on JY-18909-automated-reports-ask-jiminnyProjectv© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsCommand.php© AutomatedReportsSendCommand.php• AddLayoutEntities.phpC Team.phpC AutomatedReportsRepository.pnp© AutomatedReportsCommandTest.phpAutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.php xC AutomatedReport.phpTue 14 Apr 13:50:58C) AiPrompt.php© AutomatedReport.php© AutomatedReportResult.ph© Calendar.php© Calllmport.php© CoachingFeedback.php© CoachingFeedbackVisibilit!© CoachingSection.php© CoachingSectionCriterion.f© CoachingSectionCriterionF© CoachingSectionFeedback© CommentAbstract.pngCommentInterface.php© Contact.php© Device.php© EmailMessage.php© GenericAiPrompt.php© Group.php© Inbox.php© InboxEmail.php© InboxEmailBatch.php© Invitation.php© JobLog.php© JobTitle.phpServicesv D DatabaseV AEUs consolev A jiminny@localhostA HS_local4, SF 1 s 140 msY A PRODA consoleY d SlAGING4 consoley Docker, 0Support Daily - in 1h 10 mA100% C•AutomatedReportsCommandTestv= custom.log= laravel.logA SF ljiminny@localhost]A HS_local [jiminny@localhost]Al console [PROD]Al console (EU]A console [STAGING] X© AskJiminnyReportActivityService.phpAcuivlysearch.ong© OnDemandV2Controller.php© HistoryService.php© FilterDefinitionCollection.php© AskJiminnyReportActivityServiceTest.php© RequestGenerateAskJiminnyReportJobTest.phpX:Auto vPlaygroundC Criteria.phpMa lminnv vclass Auronaredreoortresur extenos modeuA8 X1 X1A× 556557558* Status constants560select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.freguency = 'daily'and r.status = 1AND t.status =acmveAND (r.exRicesnat >= now() OR r.expicesaat IS NULL);016 A13 V.13 лo usaeespublic const int STATUS_DEFAULT = 0;o usagespublic const int STATUS_REQUESTED = 1;16 usagespublic const int STATUS_GENERATED = 2;pubLic const 1nt SIATUS_SENI = 5:public const int STATUS_FAILED = 4;/**select * from automated_report_results where ceRentaid IN (18, 33);564565-566567568select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports;select * from automated_report_results where cepontaid IN (34, 35);47* Reason constants6 usagespublic const int REASON_DEFAULT = 0;• :OutputDid YI jiminny.automated._report.results xorows vQGOAФI report_id TWuuld (uuld with time-low a...42 ecdc1b3c-0a02-4d79-aa56-9fadc94f8d2044 befbf9ac-9575-469b-80cb-f154a3b6a1ac48 28ae7d39-16a4-4Fb5-81fc-78732676b56a46 8f89a4ef-d9e4-42c7-8920-e0a2ab72361f49 d20bfefe-ccac-4bb7-ab50-c8bb8919997350 5c9d7b33-b582-47d9-8770-a9fa31ffd68dname YImedia_type Yparent_id Y34 <null>pdf34 <null>pdf34 <null>pdf35 <null>pdf35 Test 6 - 13 .pdf35 Test 6 - 15 ..pdfI statusreason Y<null>snuLl<null>snull><null><null>I payload T1 <null>1 <null>1 <null>1 <null>o {"user_question"o {"user_question"I response TIO requested_at 7<null>ShULlSnULl<null><null><null><null>{"request_id":"d2 2026-04-14 10:46:16{"request_id": "5c2026-04-14 10:48:43IO generated_at T<null><null><null><null>2026-04-14 10:46:372026-04-14 10:49:01ID sent_at TSHULLeShULL<null><null><null>ShULL® B.I created_at2026-04-14 02026-04-14 02026-04-14 12026-04-14 02026-04-14 12026-04-14 1b rows retrieved staruina trom 1 in 468 ms (execution: 13l ms, Telching: 33/ mswinasur leams57:7UTF-84 spaces...
|
12080
|
|
12083
|
258
|
0
|
2026-04-14T10:51:00.727701+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163860727_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackHileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackHileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports {"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-_fiminny"') ("correlation-id : 5c2se861-2ca9-4h32-9f62-1736be80ca *[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started {"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}[automated-reports] Automated reportfound Test 6[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+la6lJiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...P. Adelina PetrovaO. Calva DimitravaSupport Daily - in 1h 10 m100% 147Tue 14 Apr 13:51:00Search Jiminny IncAneliya Angelova, ...84MessagesAdd canvas@ Files+гледам го* 1Today ~Lukas Kovalik 1:47 PMок готово, оправх го, и тоз път мина успешно291Nikolay Yankov 1:49 PMДобре, 2 неща:• в името на генерирания репорт е датавчера, не днес• и имейл не дойдеimage.png• а вTimeZone на моя user e SofiaLukas Kovalik 1:50 PMсмених и команда сега може да се пуска исъс id или uuid na report като --report-id ...Message Aneliya Angelova, Nikolay Yankov, Steli...Aa...
|
NULL
|
-3344648756098007304
|
NULL
|
click
|
ocr
|
NULL
|
SlackHileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackHileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports {"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-_fiminny"') ("correlation-id : 5c2se861-2ca9-4h32-9f62-1736be80ca *[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started {"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}[automated-reports] Automated reportfound Test 6[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+la6lJiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...P. Adelina PetrovaO. Calva DimitravaSupport Daily - in 1h 10 m100% 147Tue 14 Apr 13:51:00Search Jiminny IncAneliya Angelova, ...84MessagesAdd canvas@ Files+гледам го* 1Today ~Lukas Kovalik 1:47 PMок готово, оправх го, и тоз път мина успешно291Nikolay Yankov 1:49 PMДобре, 2 неща:• в името на генерирания репорт е датавчера, не днес• и имейл не дойдеimage.png• а вTimeZone на моя user e SofiaLukas Kovalik 1:50 PMсмених и команда сега може да се пуска исъс id или uuid na report като --report-id ...Message Aneliya Angelova, Nikolay Yankov, Steli...Aa...
|
NULL
|
|
12084
|
259
|
0
|
2026-04-14T10:51:00.719045+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776163860719_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js#11894 on JY-18909-automated-reports-ask-jiminnyProjectv© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsCommand.php© AutomatedReportsSendCommand.php• AddLayoutEntities.phpC Team.php© AutomatedReportsRepository.pnp© AutomatedReportsCommandTest.phpC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.php xC AutomatedReport.php, 0Tue 14 Apr 13:51:00C) AiPrompt.php© AutomatedReport.php© AutomatedReportResult.ph© Calendar.php© Calllmport.php© CoachingFeedback.php© CoachingFeedbackVisibilit!© CoachingSection.php© CoachingSectionCriterion.f© CoachingSectionCriterionF© CoachingSectionFeedback© CommentAbstract.pngCommentInterface.php© Contact.php© Device.php© EmailMessage.php© GenericAiPrompt.php© Group.php© Inbox.php© InboxEmail.php© InboxEmailBatch.php© Invitation.php© JobLog.php© JobTitle.phpServicesv D DatabaseV AEUs consolev A jiminny@localhostA HS_local4, SF 1 s 140 msY A PRODA consoleY d SlAGING4 consoley DockerSupport Daily - in 1h 10 mA100% C•AutomatedReportsCommandTestvAl console [PROD]Al console (EU]A console [STAGING] X© HistoryService.php© FilterDefinitionCollection.phpclass Auronaredreoortresur extenos modeuA8 X1 X1A× 556557558* Status constants= custom.log= laravel.log© AskJiminnyReportActivityService.phpAcuivlysearch.ong© AskJiminnyReportActivityServiceTest.phpX:Auto vA SF [jiminny@localhost]A HS_local [jiminny@localhost]© OnDemandV2Controller.php© RequestGenerateAskJiminnyReportJobTest.phpPlaygroundselect * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.freguency = 'daily'560and r.status = 1AND t.status =acmveAND (r-exRicesnat >= now() OR r.expicesaat IS NULL):C Criteria.phpMa lminnvv016 A13 V.13 л43*/o usaeespublic const int STATUS_DEFAULT = 0;o usagespublic const int STATUS_REQUESTED = 1;16 usagespublic const int STATUS_GENERATED = 2;pubLic const 1nt SIATUS_SENI = 5:public const int STATUS_FAILED = 4;/**select * from automated_report_results where ceRontaid IN (18, 33);564565-566567568select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports;select * from automated_report_results where cepontoid IN (34, 35);47* Reason constants6 usagespublic const int REASON_DEFAULT = 0;OutputDid YI jiminny.automated._report.results xorowsvQGOAФI report_id TWuund (uuld with time-low a..42 ecdc1b3c-0a02-4d79-aa56-9fadc94f8d2044 befbf9ac-9575-469b-80cb-f154a3b6a1ac48 28ae7d39-16a4-4Fb5-81fc-78732676b56a46 8f89a4ef-d9e4-42c7-8920-e0a2ab72361f49 d20bfefe-ccac-4bb7-ab50-c8bb8919997350 5c9d7b33-b582-47d9-8770-a9fa31ffd68dI name YImedia_type Yparent_id Y34 <null>pdf34 <null>pdf34 <null>pdf35 <null>pdf35 Test 6 - 13 .pdf35 Test 6 - 15 .pdfI statusreason Y<null>snuLl<null>snull><null>ShULLI payload T1 <null>1 <null>1 <null>1 <null>o {"user_question"o {"user_question"I response TIO requested_at 7<null><null><null><null><null><null><null>{"request_id":"d2 2026-04-14 10:46:16{"request_id": "5c2026-04-14 10:48:43IO generated_at T<null><null><null><null>2026-04-14 10:46:372026-04-14 10:49:01ID sent_at TSHULLeShULL<null><null><null>SIULL® B.I created_at2026-04-14 02026-04-14 02026-04-14 12026-04-14 02026-04-14 12026-04-14 1hide the active lool windowSUM: O 6:5 W Windsurf Teams57:7UTF-84 spaces...
|
NULL
|
3778229858904467545
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditViewNavigateCodeLaravelRefactorToo PhpStormFileEditViewNavigateCodeLaravelRefactorToolsWindowHelpFV faVsco.js#11894 on JY-18909-automated-reports-ask-jiminnyProjectv© ReportController.php© JiminnyDebugCommand.php© AutomatedReportsCommand.php© AutomatedReportsSendCommand.php• AddLayoutEntities.phpC Team.php© AutomatedReportsRepository.pnp© AutomatedReportsCommandTest.phpC AutomatedReportsService.php© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.php xC AutomatedReport.php, 0Tue 14 Apr 13:51:00C) AiPrompt.php© AutomatedReport.php© AutomatedReportResult.ph© Calendar.php© Calllmport.php© CoachingFeedback.php© CoachingFeedbackVisibilit!© CoachingSection.php© CoachingSectionCriterion.f© CoachingSectionCriterionF© CoachingSectionFeedback© CommentAbstract.pngCommentInterface.php© Contact.php© Device.php© EmailMessage.php© GenericAiPrompt.php© Group.php© Inbox.php© InboxEmail.php© InboxEmailBatch.php© Invitation.php© JobLog.php© JobTitle.phpServicesv D DatabaseV AEUs consolev A jiminny@localhostA HS_local4, SF 1 s 140 msY A PRODA consoleY d SlAGING4 consoley DockerSupport Daily - in 1h 10 mA100% C•AutomatedReportsCommandTestvAl console [PROD]Al console (EU]A console [STAGING] X© HistoryService.php© FilterDefinitionCollection.phpclass Auronaredreoortresur extenos modeuA8 X1 X1A× 556557558* Status constants= custom.log= laravel.log© AskJiminnyReportActivityService.phpAcuivlysearch.ong© AskJiminnyReportActivityServiceTest.phpX:Auto vA SF [jiminny@localhost]A HS_local [jiminny@localhost]© OnDemandV2Controller.php© RequestGenerateAskJiminnyReportJobTest.phpPlaygroundselect * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.freguency = 'daily'560and r.status = 1AND t.status =acmveAND (r-exRicesnat >= now() OR r.expicesaat IS NULL):C Criteria.phpMa lminnvv016 A13 V.13 л43*/o usaeespublic const int STATUS_DEFAULT = 0;o usagespublic const int STATUS_REQUESTED = 1;16 usagespublic const int STATUS_GENERATED = 2;pubLic const 1nt SIATUS_SENI = 5:public const int STATUS_FAILED = 4;/**select * from automated_report_results where ceRontaid IN (18, 33);564565-566567568select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports;select * from automated_report_results where cepontoid IN (34, 35);47* Reason constants6 usagespublic const int REASON_DEFAULT = 0;OutputDid YI jiminny.automated._report.results xorowsvQGOAФI report_id TWuund (uuld with time-low a..42 ecdc1b3c-0a02-4d79-aa56-9fadc94f8d2044 befbf9ac-9575-469b-80cb-f154a3b6a1ac48 28ae7d39-16a4-4Fb5-81fc-78732676b56a46 8f89a4ef-d9e4-42c7-8920-e0a2ab72361f49 d20bfefe-ccac-4bb7-ab50-c8bb8919997350 5c9d7b33-b582-47d9-8770-a9fa31ffd68dI name YImedia_type Yparent_id Y34 <null>pdf34 <null>pdf34 <null>pdf35 <null>pdf35 Test 6 - 13 .pdf35 Test 6 - 15 .pdfI statusreason Y<null>snuLl<null>snull><null>ShULLI payload T1 <null>1 <null>1 <null>1 <null>o {"user_question"o {"user_question"I response TIO requested_at 7<null><null><null><null><null><null><null>{"request_id":"d2 2026-04-14 10:46:16{"request_id": "5c2026-04-14 10:48:43IO generated_at T<null><null><null><null>2026-04-14 10:46:372026-04-14 10:49:01ID sent_at TSHULLeShULL<null><null><null>SIULL® B.I created_at2026-04-14 02026-04-14 02026-04-14 12026-04-14 02026-04-14 12026-04-14 1hide the active lool windowSUM: O 6:5 W Windsurf Teams57:7UTF-84 spaces...
|
NULL
|
|
12222
|
NULL
|
0
|
2026-04-14T10:55:59.200553+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164159200_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports{"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report Jdaily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"c[automated-reports] Automated report[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+Jiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...• Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...?. Adelina Petrova |O. Cala Dimitrava MKSupport Daily • in 1h 5 m100% <47Tue 14 Apr 13:55:59Search Jiminny Inc# releases8 226 02 Messages@ Files@ Bookmarks+Thursday, April 9th~View JobToday ~NewCircleCl APP 11:49 AMNew commits deployed to Prophet Prod-US:[078d4ed](https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4) - [JY-20574](https://jiminny.atlassian.net/browse/JY-20574): panorama pdf add header section(#467) (steliyan-g)[5301082](https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74) - JY-20575](https://jiminny.atlassian.net/browse/JY-20575): panorama reports absolute links (#466)(steliyan-g)[11f99de](https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5) - [JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)[8cf63ce]Message #releases+ Aa...
|
NULL
|
2382598937281463249
|
NULL
|
click
|
ocr
|
NULL
|
SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCK SlackFileEdit ViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08Jstaging. INFO: [automated-reports]id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"Checking conditions {"isMonda,"trace_id" :"185df6f6-4327-4609-9c2e-2ab83a[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reports{"cab83a0f5432"}[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report Jdaily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"c[automated-reports] Automated report[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportjdaily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#l+HomeDMsActivityFilesLater.*•More+Jiminny ...& Starred8 platform-inner-teamChannels# ai-chapter# alerts# backend# confusion-clinic# curiosity_lab# engineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of _jimi...• Direct messagesAneliya Angelova, ...Ro Steliyan Georgiev3 Adelina Petrova, Ili...?. Adelina Petrova |O. Cala Dimitrava MKSupport Daily • in 1h 5 m100% <47Tue 14 Apr 13:55:59Search Jiminny Inc# releases8 226 02 Messages@ Files@ Bookmarks+Thursday, April 9th~View JobToday ~NewCircleCl APP 11:49 AMNew commits deployed to Prophet Prod-US:[078d4ed](https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4) - [JY-20574](https://jiminny.atlassian.net/browse/JY-20574): panorama pdf add header section(#467) (steliyan-g)[5301082](https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74) - JY-20575](https://jiminny.atlassian.net/browse/JY-20575): panorama reports absolute links (#466)(steliyan-g)[11f99de](https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5) - [JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)[8cf63ce]Message #releases+ Aa...
|
NULL
|
|
12225
|
NULL
|
0
|
2026-04-14T10:56:03.895326+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164163895_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormProject vFileFV faVsco.js vEditViewNavigat PhpStormProject vFileFV faVsco.js vEditViewNavigateCodeLaravelRefactor• #11894 on JY-18909-automated-reports-ask-jiminny ~© ReportController.phpToolsWindowHelp© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.phpInboxEmailBatchRepository©InboxRepository.php© InvitationRepository.php© JobRepository.phpC LanquageRepository.php© MomentRepository.phpNotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php© PlaylistActivityRepository.f© PlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.phpC) RoleChangeEventRepositol© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php©TopicRepository.php© TopicTriggerRepository.ph©TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph©TranscriptionSummaryRepr© UserRepository.php© VocabularyRepository.php› D Rulesv D Services> D Activity> D AjReports> D Avatar0 CalendarC ConferenceD Crm› D Import> MInternalv MKioskv M AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsS:© DealStagesService.p© RecipientsService.phJiminnybeouecommana.ong© AutomatedReportsCommand.phpAulomaleakeporskeposilory.oneC AutomatedReportsService.php XCreateHeldActivityEvent.php© UserPilotActivityListener.php© AutomatedReportResult.php24.01.40 NIKOlov23.10.25 Ivanov7.08.25Nikolov0006657.08.25Nikolov7.08.25Nikolov108.25NIKOlOV I© ActivityLogged.php© AutomatedReportsCallbackService.phpAutomatedReportsSendCommand.php• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AutomatedReport.phpclass Auromareareporcsservicepublic function getReportTypeName(AutomatedReportResult $report): stringreturn $getType['name'];© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php15.U.o Vanov1.00.40NIKOlOV23.10.25 Ivanov23.10.25 Ivanov23.10.25 Ivanov7.08.25Nikolov7.08.25Nikolov8.04.26Kovalik8.04.10Kovalik8.04.20Kovalik6.04.40Kovalik6.04.40KOVallk7.08.25 Nikolov8.04.268.04.26Kovalik8.04.26Kovalik7.08.25Nikolov7.08.25Nikolov21.08.25 Kovalik21.08.25 Kovalik21.08.25 Kovalik21.08.25 Kovalik21.00.2o KOVallK14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov7.08.2524.03.26 Kovalik4.05.o Kovalk24.03.26 Kovalik108.25NIKO.OV14.08.25 Nikolov7.08.25NKOOV15.08.25 Nikolov15.08.25 Nikolov15.08.25 Nikolov7.08.25Nikolov14.08.25 Nikolov15.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov16.08.25 Nkolov108.25NIKOlOV I4102 ×3 м34 ^67101467367467567667767867908068168268368468568668707169770170370770971126 usagesououc tuncmon ceureoorurer oovale Aurold eoreoortresuur nreoort, sumino$from = $report->getFromDate();$to = $report->getToDate();$frequency = $report->getReport()->getFrequency();if ($from === null || $to === null) {if (! $report->getReport()->isAskJiminnyReport()) {sinvaL1dPer1od = prrom === null : "trom" : "to'!thray new AppLicationExIption( message:'Report period is invalid: ' . $invalidPeriod):© Exception$period = $thi$from = $perid$to = $period[#[Pure]pUDLIC TUNctIon__construct(Smessage = "™$code = 0,Sprevious = null): Exceptionreturn $this->forn2 usagesonvate Tuncclon torild$toYear = $to->for$differentYears =Construct the exception. Note: The message is NOTbinary safe.Parameters:string $message - [optional] TheException message to throw.int ($code - [optional] The Exceptioncode.nuLinrovaole sorevous - ootonallThe previous throwable used for theexception chaining.Carbon $to): stringswitch ($frequencycase self::FREreturn $frLinks:Source:nos.//ono.neumanual/en/exceouorconstruct.php<stubs> /Core/Core_c.phpcase self:: FREconstrcr on ononera// 'Jan-Ma.$startMonth = $from->format( format:"M');$endMonth = $to->copy ()->subMonthO):$endMonthName = $endMonth->format( format: "M');$endMonthYear = $endMonth->format( format: "Y');if ($differentYears) {return "{$startMonth} {$fromYear}- {$endMonthName} {$endMonthYear}":recurn "isstartmonchs - ipendronchnames ipcoyears"?14.08.25 Nikolov1.00.40INIKOlOV7.08.25 NikolovPushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (26 minutes ago)case self:: FREQUENCY_MONTHLY:// 'May 2025' - monthly reports are always within the same yearreturn $from->format( format:) 'M Y');loblj Support Daily • in 1h 4 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 13:56:03= custom.log= laravel.logA SF ljiminny@localhost]4 HS_local [jiminny@localhost]A console [STAGING] X© AskJiminnyReportActivityService.php© ActivitySearch.php© FilterDefinitionCollection.php© Criteria.php© AskJiminnyReportActivityServiceTest.phpX:Auto vPlavaroundvAl console [PROD]A console [EU]cOnbemanavzcontroller.oneC HistoryService.php© RequestGenerateAskJiminnyReportJobTest.phpMa lminnv v521-52252352452552652715281530531532533534535-536537538539540541542543=545=546=547548549550551554553554555556557558559560561562563-564565566— 567=568E569JOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':016 A13 V.13 лselect * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage.# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1..n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;where crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team id = t.idWHERE r.Erequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expires.at IS NULL):select * from automated_report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;W Windsurf Teams 682:30UTF-84 spaces...
|
NULL
|
8139879210557574931
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormProject vFileFV faVsco.js vEditViewNavigat PhpStormProject vFileFV faVsco.js vEditViewNavigateCodeLaravelRefactor• #11894 on JY-18909-automated-reports-ask-jiminny ~© ReportController.phpToolsWindowHelp© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.phpInboxEmailBatchRepository©InboxRepository.php© InvitationRepository.php© JobRepository.phpC LanquageRepository.php© MomentRepository.phpNotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php© PlaylistActivityRepository.f© PlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.phpC) RoleChangeEventRepositol© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php©TopicRepository.php© TopicTriggerRepository.ph©TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph©TranscriptionSummaryRepr© UserRepository.php© VocabularyRepository.php› D Rulesv D Services> D Activity> D AjReports> D Avatar0 CalendarC ConferenceD Crm› D Import> MInternalv MKioskv M AutomatedReports© ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsS:© DealStagesService.p© RecipientsService.phJiminnybeouecommana.ong© AutomatedReportsCommand.phpAulomaleakeporskeposilory.oneC AutomatedReportsService.php XCreateHeldActivityEvent.php© UserPilotActivityListener.php© AutomatedReportResult.php24.01.40 NIKOlov23.10.25 Ivanov7.08.25Nikolov0006657.08.25Nikolov7.08.25Nikolov108.25NIKOlOV I© ActivityLogged.php© AutomatedReportsCallbackService.phpAutomatedReportsSendCommand.php• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AutomatedReport.phpclass Auromareareporcsservicepublic function getReportTypeName(AutomatedReportResult $report): stringreturn $getType['name'];© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php15.U.o Vanov1.00.40NIKOlOV23.10.25 Ivanov23.10.25 Ivanov23.10.25 Ivanov7.08.25Nikolov7.08.25Nikolov8.04.26Kovalik8.04.10Kovalik8.04.20Kovalik6.04.40Kovalik6.04.40KOVallk7.08.25 Nikolov8.04.268.04.26Kovalik8.04.26Kovalik7.08.25Nikolov7.08.25Nikolov21.08.25 Kovalik21.08.25 Kovalik21.08.25 Kovalik21.08.25 Kovalik21.00.2o KOVallK14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov7.08.2524.03.26 Kovalik4.05.o Kovalk24.03.26 Kovalik108.25NIKO.OV14.08.25 Nikolov7.08.25NKOOV15.08.25 Nikolov15.08.25 Nikolov15.08.25 Nikolov7.08.25Nikolov14.08.25 Nikolov15.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov16.08.25 Nkolov108.25NIKOlOV I4102 ×3 м34 ^67101467367467567667767867908068168268368468568668707169770170370770971126 usagesououc tuncmon ceureoorurer oovale Aurold eoreoortresuur nreoort, sumino$from = $report->getFromDate();$to = $report->getToDate();$frequency = $report->getReport()->getFrequency();if ($from === null || $to === null) {if (! $report->getReport()->isAskJiminnyReport()) {sinvaL1dPer1od = prrom === null : "trom" : "to'!thray new AppLicationExIption( message:'Report period is invalid: ' . $invalidPeriod):© Exception$period = $thi$from = $perid$to = $period[#[Pure]pUDLIC TUNctIon__construct(Smessage = "™$code = 0,Sprevious = null): Exceptionreturn $this->forn2 usagesonvate Tuncclon torild$toYear = $to->for$differentYears =Construct the exception. Note: The message is NOTbinary safe.Parameters:string $message - [optional] TheException message to throw.int ($code - [optional] The Exceptioncode.nuLinrovaole sorevous - ootonallThe previous throwable used for theexception chaining.Carbon $to): stringswitch ($frequencycase self::FREreturn $frLinks:Source:nos.//ono.neumanual/en/exceouorconstruct.php<stubs> /Core/Core_c.phpcase self:: FREconstrcr on ononera// 'Jan-Ma.$startMonth = $from->format( format:"M');$endMonth = $to->copy ()->subMonthO):$endMonthName = $endMonth->format( format: "M');$endMonthYear = $endMonth->format( format: "Y');if ($differentYears) {return "{$startMonth} {$fromYear}- {$endMonthName} {$endMonthYear}":recurn "isstartmonchs - ipendronchnames ipcoyears"?14.08.25 Nikolov1.00.40INIKOlOV7.08.25 NikolovPushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (26 minutes ago)case self:: FREQUENCY_MONTHLY:// 'May 2025' - monthly reports are always within the same yearreturn $from->format( format:) 'M Y');loblj Support Daily • in 1h 4 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 13:56:03= custom.log= laravel.logA SF ljiminny@localhost]4 HS_local [jiminny@localhost]A console [STAGING] X© AskJiminnyReportActivityService.php© ActivitySearch.php© FilterDefinitionCollection.php© Criteria.php© AskJiminnyReportActivityServiceTest.phpX:Auto vPlavaroundvAl console [PROD]A console [EU]cOnbemanavzcontroller.oneC HistoryService.php© RequestGenerateAskJiminnyReportJobTest.phpMa lminnv v521-52252352452552652715281530531532533534535-536537538539540541542543=545=546=547548549550551554553554555556557558559560561562563-564565566— 567=568E569JOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':016 A13 V.13 лselect * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage.# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc1<->1..n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;where crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team id = t.idWHERE r.Erequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expires.at IS NULL):select * from automated_report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;W Windsurf Teams 682:30UTF-84 spaces...
|
12224
|
|
12226
|
261
|
0
|
2026-04-14T10:56:06.931959+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164166931_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-liminny ~Project v© EmailMessageRepository.pC) GenericAiPromptRepositorg grouprepository.phpInboxEmailBatchRepositonC InboxRepository.php© InvitationRepository.pnpC) JobRepositorv.ohpC LanquageRepository.phpC MomentRepository.phpC NotificationRepository.php© ParticipantRepository.phpC ParticipantSpeechRepositoC ParticipantStatsRepository© PlaybookCategoryRepositcg Playbookkepository.phpPlaylistActivityRepository.pPlaylistRepository.php(C) PlavlistShareRepositorv.ph© QuestionRepository.phpC) RoleChangeEventRepositol(C) RoleRepository.php(©) SearchRepository.php©) SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.pC) TeaminsiahtsRepositorv.phC) TeamRepository.php©) ThemeRepository.php(C) TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph© TranscriptionSummaryRepC UserRepository-php© VocabularyRepository.php› D Rulesv _ Services> _ Activity> D AjReports>D AvatarlcalendarConterenceM ermD Import> MInternalv MKioskv M AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportsC(©) AutomatedReportsSi© DealStagesService.p(© RecipientsService.ph(©) ReportController.phpyJiminnyDeouecommana.ongC AutomatedReportsCommand.phpl/utomatecRenorissenoCommana.ongC AddLayoutEntities.php(©) Team.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php x© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpC CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php(©) AutomatedReportResult.phpc) Automatedkeport.one24.01.40 NIKOlov23.10.25 Ivanov7.08.25NikolovNIKOlOV108.25108.25NikolovNIKOlOV I15.U.o Vanov1.00.40NIKOlOV23.10.25 Ivanov23.10.25 Ivanov23.10.25 Ivanov7.08.25Nikolov7.08.25Nikolov8.04.26Kovallk8.04.10Kovallk8.04.20Kovallk6.04.40KoVallk6.04.40KOVallk7.08.25 Nikolov8.04.268.04.26Kovalik8.04.26Kovalik7.08.25Nikolov7.08.25Nikolov21.08.25 KovalikO8. Kovalk¾.08.25 Kovalk21.08.25 Kovalik21.00.2o KOVallK14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov7.08.25 Nikolov24.03.26 Kovalik4.05.o Kovalk405.o Kovallk108.25NIKO.OV14.08.25 Nikolov7.08.25NKOOV15.08.25 Nikolov15.08.25 Nikolov15.08.25 Nikolov70825Nikolov14.08.25 Nikolov15.08.25 Nikolov14.08.25 Nikolov14.08.16 Nkolov15.08.25 Nikolov108.25NIKOlOV I14.08.25 Nikolov1.00.40INIKOlOV7.08.25 Nikolov4102 ×3 м34 ^0006656/0671014673674675676670678080681682683684685687684071691703707709class Aucomareareporcsservicepublic function getReportTypeName AutomatedReportResult Sreport): stringrecurn sgeclypel name'Jio usacespublic function aetReportPeriodNameAutomatedReportResult Sreport): string$from = Sreport->getFromDateo:$to = Sreport->getToDateo:sfrequency = sreport->getReporto->getrrequencyohif (sfrom === null || Sto === null)if (! $report->getReport()->isAskJiminnyReportO) {sinvaL1dPer1od = prrom === null : "trom" : "to'!throw new ApplicationExcAption( message: 'Report period is invalid: ' • $invalidPeriod);$period = $this->calculateFromAndToDatePeriod$frequency) :$from = Speriod 'fromDate'l:$to = $periodl'toDate'JFreturn sthis->formatReportPer1odName(Sfrequency, sfrom, $to):2 usagesprivate function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): stringEfconxearmnstrom-aformat( format: Wihi$toYear = $to->format( format: "Y);$differentYears = $fromYear !== StoYear:switch (sfrequency)case self::FREQUENCY_DAILY:recurn prron->formatt format 'J MY);case selt.:-rcUUENLY UUAKICKLY.// Jan-Mar z02s or "Nov 2024-Jan 202o it years aitterSstartMonth = Sfrom->format format: "M')SendMonth = $to->copy@->subMontho:SendMonthName = SendMonth->format format: 'M'):SendMonthYear = SendMonth->format( format: "Y");if (Sdifferentyears)return "isstarthonths isfromyears- sendMonthvame, * sendMonthyear.".recurn "isstarthonchs - ipendronuhnames ipcorears";case self::FREQUENCY_MONTHLY:'May 2025' - monthly reports are always within the same yearreturn sfrom->format( format: 'M Y'):Pusned 1 commit to origin/Jy-18909-automated-reports-ask-jiminny |/ View pull request (26 minutes ago)loblSupport Daily • in 1h 4 m100% |45]Tue 14 Apr 13:56:06AutomatedReportsCommandTestv= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostd console PRODIL console EU]L console [STAGING] XC AskJiminnyReportActivityService.php© ActivitySearch.phpcOnbemanavzcontroller.oneC HistoryService.php© FllterDefinitionCollection.phpC) RequestGenerateAskJiminnyReportJobTest.php521— 52252352415261527152815305315325335345355365375381557540541542543= 545₴546=54754815491550551554553554555556557558559560561-562563—564565566—57= 568© Criteria.php© AskJiminnyReportActivityServiceTest.phpX:Auto vPlavaroundvMa lminnv v016 A13 V.13 ^JOIN users u on U.id = sa.sociable idJOIN teams t .n<->l: on t.1d = u.team_1dWHERE U.team_1d = 1 and sa.provider = 'salesforce';seLect * trom teams where 1d = 1;select * from groups g JOIN playbooks p 1..n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_1d = 1;Iselect * from plavbooks where id = 175:select * from playbook categories where playbook id = 175:select * from users where team id = 1:select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# 10, UU1d, type, provider, playdook_cacegory_1d, user_1a, lead_1a, contact_ld, account_ld, opporcunity_1a, stage# crn_contiguracion_1d, crm_provider_1d, transcription_1d, statusfrom activities where crm confiquration id = 1 and tvoe = 'conferencei# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.1d, p.activity_type, pc.1d, pc.nameFROM playbooks pjoin playbook_categories pc1<->l.n: on p.ld = pc.playbook_1dwhere p.team_id = 1 and p.activity_type = 'event';ISELECT * FROM crm field values WHERE crm field id = 4:where crm confiquration id = 1 and pl.playbook id = 175:select * from teams;SELECT r.* FROM automated_reports nboin teams t on r.team id = t.idWHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expires.at IS NULL):select * from automated_report_results where report id IN (18, 33);select * from activity searches where id = 10932W Windsurf Teams 682:30UTF-8f 4 spaces...
|
NULL
|
1344292160722616362
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileFditViewNavigateCodeLaravelRefactonToo PhpStormFileFditViewNavigateCodeLaravelRefactonToolsWindowHelpFV faVsco.js v#11894 on JY-18909-automated-reports-ask-liminny ~Project v© EmailMessageRepository.pC) GenericAiPromptRepositorg grouprepository.phpInboxEmailBatchRepositonC InboxRepository.php© InvitationRepository.pnpC) JobRepositorv.ohpC LanquageRepository.phpC MomentRepository.phpC NotificationRepository.php© ParticipantRepository.phpC ParticipantSpeechRepositoC ParticipantStatsRepository© PlaybookCategoryRepositcg Playbookkepository.phpPlaylistActivityRepository.pPlaylistRepository.php(C) PlavlistShareRepositorv.ph© QuestionRepository.phpC) RoleChangeEventRepositol(C) RoleRepository.php(©) SearchRepository.php©) SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.pC) TeaminsiahtsRepositorv.phC) TeamRepository.php©) ThemeRepository.php(C) TimezoneRepository.php© TopicRepository.php© TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph© TranscriptionSummaryRepC UserRepository-php© VocabularyRepository.php› D Rulesv _ Services> _ Activity> D AjReports>D AvatarlcalendarConterenceM ermD Import> MInternalv MKioskv M AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportsC(©) AutomatedReportsSi© DealStagesService.p(© RecipientsService.ph(©) ReportController.phpyJiminnyDeouecommana.ongC AutomatedReportsCommand.phpl/utomatecRenorissenoCommana.ongC AddLayoutEntities.php(©) Team.phpC AutomatedReportsRepository.phpC AutomatedReportsService.php x© CreateHeldActivityEvent.php© TrackProviderInstalledEvent.phpC CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php(©) AutomatedReportResult.phpc) Automatedkeport.one24.01.40 NIKOlov23.10.25 Ivanov7.08.25NikolovNIKOlOV108.25108.25NikolovNIKOlOV I15.U.o Vanov1.00.40NIKOlOV23.10.25 Ivanov23.10.25 Ivanov23.10.25 Ivanov7.08.25Nikolov7.08.25Nikolov8.04.26Kovallk8.04.10Kovallk8.04.20Kovallk6.04.40KoVallk6.04.40KOVallk7.08.25 Nikolov8.04.268.04.26Kovalik8.04.26Kovalik7.08.25Nikolov7.08.25Nikolov21.08.25 KovalikO8. Kovalk¾.08.25 Kovalk21.08.25 Kovalik21.00.2o KOVallK14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov14.08.25 Nikolov7.08.25 Nikolov24.03.26 Kovalik4.05.o Kovalk405.o Kovallk108.25NIKO.OV14.08.25 Nikolov7.08.25NKOOV15.08.25 Nikolov15.08.25 Nikolov15.08.25 Nikolov70825Nikolov14.08.25 Nikolov15.08.25 Nikolov14.08.25 Nikolov14.08.16 Nkolov15.08.25 Nikolov108.25NIKOlOV I14.08.25 Nikolov1.00.40INIKOlOV7.08.25 Nikolov4102 ×3 м34 ^0006656/0671014673674675676670678080681682683684685687684071691703707709class Aucomareareporcsservicepublic function getReportTypeName AutomatedReportResult Sreport): stringrecurn sgeclypel name'Jio usacespublic function aetReportPeriodNameAutomatedReportResult Sreport): string$from = Sreport->getFromDateo:$to = Sreport->getToDateo:sfrequency = sreport->getReporto->getrrequencyohif (sfrom === null || Sto === null)if (! $report->getReport()->isAskJiminnyReportO) {sinvaL1dPer1od = prrom === null : "trom" : "to'!throw new ApplicationExcAption( message: 'Report period is invalid: ' • $invalidPeriod);$period = $this->calculateFromAndToDatePeriod$frequency) :$from = Speriod 'fromDate'l:$to = $periodl'toDate'JFreturn sthis->formatReportPer1odName(Sfrequency, sfrom, $to):2 usagesprivate function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): stringEfconxearmnstrom-aformat( format: Wihi$toYear = $to->format( format: "Y);$differentYears = $fromYear !== StoYear:switch (sfrequency)case self::FREQUENCY_DAILY:recurn prron->formatt format 'J MY);case selt.:-rcUUENLY UUAKICKLY.// Jan-Mar z02s or "Nov 2024-Jan 202o it years aitterSstartMonth = Sfrom->format format: "M')SendMonth = $to->copy@->subMontho:SendMonthName = SendMonth->format format: 'M'):SendMonthYear = SendMonth->format( format: "Y");if (Sdifferentyears)return "isstarthonths isfromyears- sendMonthvame, * sendMonthyear.".recurn "isstarthonchs - ipendronuhnames ipcorears";case self::FREQUENCY_MONTHLY:'May 2025' - monthly reports are always within the same yearreturn sfrom->format( format: 'M Y'):Pusned 1 commit to origin/Jy-18909-automated-reports-ask-jiminny |/ View pull request (26 minutes ago)loblSupport Daily • in 1h 4 m100% |45]Tue 14 Apr 13:56:06AutomatedReportsCommandTestv= custom.log= laravel.logL SF (iminny@localhost« HS_local fiminny@localhostd console PRODIL console EU]L console [STAGING] XC AskJiminnyReportActivityService.php© ActivitySearch.phpcOnbemanavzcontroller.oneC HistoryService.php© FllterDefinitionCollection.phpC) RequestGenerateAskJiminnyReportJobTest.php521— 52252352415261527152815305315325335345355365375381557540541542543= 545₴546=54754815491550551554553554555556557558559560561-562563—564565566—57= 568© Criteria.php© AskJiminnyReportActivityServiceTest.phpX:Auto vPlavaroundvMa lminnv v016 A13 V.13 ^JOIN users u on U.id = sa.sociable idJOIN teams t .n<->l: on t.1d = u.team_1dWHERE U.team_1d = 1 and sa.provider = 'salesforce';seLect * trom teams where 1d = 1;select * from groups g JOIN playbooks p 1..n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_1d = 1;Iselect * from plavbooks where id = 175:select * from playbook categories where playbook id = 175:select * from users where team id = 1:select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# 10, UU1d, type, provider, playdook_cacegory_1d, user_1a, lead_1a, contact_ld, account_ld, opporcunity_1a, stage# crn_contiguracion_1d, crm_provider_1d, transcription_1d, statusfrom activities where crm confiquration id = 1 and tvoe = 'conferencei# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.1d, p.activity_type, pc.1d, pc.nameFROM playbooks pjoin playbook_categories pc1<->l.n: on p.ld = pc.playbook_1dwhere p.team_id = 1 and p.activity_type = 'event';ISELECT * FROM crm field values WHERE crm field id = 4:where crm confiquration id = 1 and pl.playbook id = 175:select * from teams;SELECT r.* FROM automated_reports nboin teams t on r.team id = t.idWHERE r.frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expires.at IS NULL):select * from automated_report_results where report id IN (18, 33);select * from activity searches where id = 10932W Windsurf Teams 682:30UTF-8f 4 spaces...
|
NULL
|
|
12228
|
260
|
0
|
2026-04-14T10:56:12.083656+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164172083_m1.jpg...
|
Slack
|
releases (Channel) - Jiminny Inc - Slack
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Files
Files
Bookmarks
Bookmarks
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
GitHub
APP
Apr 9th at 7:07:11 PM
7:07 PM
3 new commits
3 new commits
pushed to
master
master
by
mihailmihaylovjiminny
mihailmihaylovjiminny
a3a45d3a
a3a45d3a
- JY-20634: Fix legacy sentence segments
eacdcce0
eacdcce0
- JY-20634: Add comments
09c3f776
09c3f776
- Merge pull request #11943 from jiminny/JY-20634-transcription-issue-timings
jiminny/app
jiminny/app
|
Added by
GitHub
GitHub
CircleCI
APP
Apr 9th at 7:33:52 PM
7:33 PM
Deployment Successful! tada emoji
Deployment Successful!
Project
: app
When
: 04/09/2026 16:33:51
Tag
:
View Job
View Job
Jump to date
New
CircleCI
APP
Today at 11:49:13 AM
11:49 AM
New commits deployed to Prophet Prod-US:
[078d4ed](
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
) - [JY-20574](
https://jiminny.atlassian.net/browse/JY-20574
https://jiminny.atlassian.net/browse/JY-20574
): panorama pdf add header section (#467) (steliyan-g)
[5301082](
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
) - [JY-20575](
https://jiminny.atlassian.net/browse/JY-20575
https://jiminny.atlassian.net/browse/JY-20575
): panorama reports absolute links (#466) (steliyan-g)
[11f99de](
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
) - [JY-20571](
https://jiminny.atlassian.net/browse/JY-20571
https://jiminny.atlassian.net/browse/JY-20571
): Panorama offline reports (#465) (steliyan-g)
[8cf63ce](
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
) - [JY-19982](
https://jiminny.atlassian.net/browse/JY-19982
https://jiminny.atlassian.net/browse/JY-19982
): Allow multiple LLM evals with one command run (#464) (steliyan-g)
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:49:35 AM
11:49
New commits deployed to Prophet Prod-EU:
[078d4ed](
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
) - [JY-20574](
https://jiminny.atlassian.net/browse/JY-20574
https://jiminny.atlassian.net/browse/JY-20574
): panorama pdf add header section (#467) (steliyan-g)
[5301082](
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
) - [JY-20575](
https://jiminny.atlassian.net/browse/JY-20575
https://jiminny.atlassian.net/browse/JY-20575
): panorama reports absolute links (#466) (steliyan-g)
[11f99de](
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
) - [JY-20571](
https://jiminny.atlassian.net/browse/JY-20571
https://jiminny.atlassian.net/browse/JY-20571
): Panorama offline reports (#465) (steliyan-g)
[8cf63ce](
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
) - [JY-19982](
https://jiminny.atlassian.net/browse/JY-19982
https://jiminny.atlassian.net/browse/JY-19982
): Allow multiple LLM evals with one command run (#464) (steliyan-g)
loading…
Channel releases...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.4861111,"top":0.08777778,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.4861111,"top":0.14555556,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"bounds":{"left":0.4861111,"top":0.20333333,"width":0.022222223,"height":0.035555556},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.525,"top":0.07777778,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5326389,"top":0.13,"width":0.020833334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.525,"top":0.15333334,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"bounds":{"left":0.5347222,"top":0.20555556,"width":0.016666668,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"bounds":{"left":0.525,"top":0.22888888,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"bounds":{"left":0.52916664,"top":0.28111112,"width":0.027083334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"bounds":{"left":0.525,"top":0.30444443,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.5347222,"top":0.35666665,"width":0.015972223,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"bounds":{"left":0.525,"top":0.38,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"bounds":{"left":0.53402776,"top":0.43222222,"width":0.018055556,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"bounds":{"left":0.525,"top":0.45555556,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"bounds":{"left":0.53333336,"top":0.50777775,"width":0.01875,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.06111111,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.050694443,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.093055554,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.046527777,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.025694445,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.072222225,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.057638887,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.054166667,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.034027778,"height":0.007777778},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.60625,"top":0.14666666,"width":0.061805554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"bounds":{"left":0.60625,"top":0.17777778,"width":0.048611112,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"bounds":{"left":0.60625,"top":0.20888889,"width":0.072916664,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"bounds":{"left":0.60625,"top":0.24,"width":0.08055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"bounds":{"left":0.60625,"top":0.2711111,"width":0.035416666,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"bounds":{"left":0.60625,"top":0.30222222,"width":0.036805555,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"bounds":{"left":0.60625,"top":0.33333334,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"bounds":{"left":0.60625,"top":0.36444443,"width":0.036111113,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"bounds":{"left":0.60625,"top":0.39555556,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"bounds":{"left":0.60625,"top":0.42666668,"width":0.094444446,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"bounds":{"left":0.60625,"top":0.5,"width":0.07847222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.68472224,"top":0.5,"width":0.013194445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68958336,"top":0.5,"width":0.029861111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"bounds":{"left":0.60625,"top":0.5311111,"width":0.07986111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.56222224,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.67777777,"top":0.56222224,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"bounds":{"left":0.68333334,"top":0.56222224,"width":0.015972223,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.5933333,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.6244444,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"bounds":{"left":0.60625,"top":0.65555555,"width":0.055555556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.60625,"top":0.68666667,"width":0.07152778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7177778,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7177778,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.68472224,"top":0.7177778,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7488889,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7488889,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68472224,"top":0.7488889,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.60625,"top":0.78,"width":0.06875,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"bounds":{"left":0.60625,"top":0.85333335,"width":0.045833334,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"bounds":{"left":0.60625,"top":0.8844444,"width":0.024305556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"bounds":{"left":0.60625,"top":0.91555554,"width":0.06388889,"height":0.02},"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.73125,"top":0.12777779,"width":0.06458333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.75069445,"top":0.14,"width":0.039583333,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":17,"bounds":{"left":0.79791665,"top":0.12777779,"width":0.04375,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":19,"bounds":{"left":0.8173611,"top":0.14,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Bookmarks","depth":17,"bounds":{"left":0.84444445,"top":0.12777779,"width":0.07083333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Bookmarks","depth":19,"bounds":{"left":0.86388886,"top":0.14,"width":0.045833334,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.91736114,"top":0.12777779,"width":0.022916667,"height":0.04222222},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":22,"bounds":{"left":0.80625,"top":0.17666666,"width":0.10486111,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"GitHub","depth":23,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.034722224,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"APP","depth":23,"bounds":{"left":0.8034722,"top":0.16111112,"width":0.013888889,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"","depth":23,"bounds":{"left":0.8194444,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 7:07:11 PM","depth":23,"bounds":{"left":0.82430553,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:07 PM","depth":24,"bounds":{"left":0.82430553,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"3 new commits","depth":23,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06944445,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3 new commits","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06944445,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"pushed to","depth":23,"bounds":{"left":0.83402777,"top":0.16111112,"width":0.05138889,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"master","depth":24,"bounds":{"left":0.8875,"top":0.16111112,"width":0.030555556,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"master","depth":25,"bounds":{"left":0.8875,"top":0.16111112,"width":0.030555556,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"by","depth":23,"bounds":{"left":0.9201389,"top":0.16111112,"width":0.013888889,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"mihailmihaylovjiminny","depth":23,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.10138889,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"mihailmihaylovjiminny","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.10138889,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"a3a45d3a","depth":26,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"a3a45d3a","depth":27,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"- JY-20634: Fix legacy sentence segments","depth":25,"bounds":{"left":0.77569443,"top":0.16111112,"width":0.19305556,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"eacdcce0","depth":26,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"eacdcce0","depth":27,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"- JY-20634: Add comments","depth":25,"bounds":{"left":0.8215278,"top":0.16111112,"width":0.12708333,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"09c3f776","depth":26,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"09c3f776","depth":27,"bounds":{"left":0.77847224,"top":0.16111112,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"- Merge pull request #11943 from jiminny/JY-20634-transcription-issue-timings","depth":25,"bounds":{"left":0.77569443,"top":0.16111112,"width":0.19791667,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"jiminny/app","depth":25,"bounds":{"left":0.7895833,"top":0.16111112,"width":0.043055557,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"jiminny/app","depth":26,"bounds":{"left":0.7895833,"top":0.16111112,"width":0.043055557,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"|","depth":25,"bounds":{"left":0.83263886,"top":0.16111112,"width":0.00625,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Added by","depth":25,"bounds":{"left":0.8388889,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"GitHub","depth":25,"bounds":{"left":0.87569445,"top":0.16111112,"width":0.027083334,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"GitHub","depth":26,"bounds":{"left":0.87569445,"top":0.16111112,"width":0.027083334,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"CircleCI","depth":23,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.0375,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"APP","depth":23,"bounds":{"left":0.80625,"top":0.16111112,"width":0.013888889,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"","depth":23,"bounds":{"left":0.82222223,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 7:33:52 PM","depth":23,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:33 PM","depth":24,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXHeading","text":"Deployment Successful! tada emoji","depth":23,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.21805556,"height":0.0011111111},"role_description":"heading"},{"role":"AXStaticText","text":"Deployment Successful!","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.13819444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Project","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.033333335,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":": app","depth":24,"bounds":{"left":0.79791665,"top":0.16111112,"width":0.022222223,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"When","depth":24,"bounds":{"left":0.8388889,"top":0.16111112,"width":0.028472222,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":": 04/09/2026 16:33:51","depth":24,"bounds":{"left":0.8388889,"top":0.16111112,"width":0.058333334,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Tag","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.015972223,"height":0.011111111},"role_description":"text"},{"role":"AXStaticText","text":":","depth":24,"bounds":{"left":0.78055555,"top":0.16111112,"width":0.0027777778,"height":0.011111111},"role_description":"text"},{"role":"AXButton","text":"View Job","depth":24,"bounds":{"left":0.76458335,"top":0.19222222,"width":0.049305554,"height":0.031111112},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"View Job","depth":26,"bounds":{"left":0.7708333,"top":0.19888888,"width":0.036805555,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":22,"bounds":{"left":0.83194447,"top":0.24777777,"width":0.05277778,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"New","depth":22,"bounds":{"left":0.96458334,"top":0.25444445,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXButton","text":"CircleCI","depth":23,"bounds":{"left":0.76458335,"top":0.2911111,"width":0.0375,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"APP","depth":23,"bounds":{"left":0.80625,"top":0.29666665,"width":0.013888889,"height":0.013333334},"role_description":"text"},{"role":"AXStaticText","text":"","depth":23,"bounds":{"left":0.82222223,"top":0.29333332,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 11:49:13 AM","depth":23,"bounds":{"left":0.82708335,"top":0.29666665,"width":0.0375,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:49 AM","depth":24,"bounds":{"left":0.82708335,"top":0.29666665,"width":0.0375,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"New commits deployed to Prophet Prod-US:","depth":24,"bounds":{"left":0.76458335,"top":0.31777778,"width":0.20277777,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"[078d4ed](","depth":24,"bounds":{"left":0.76458335,"top":0.3422222,"width":0.047916666,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4","depth":24,"bounds":{"left":0.76458335,"top":0.36666667,"width":0.21597221,"height":0.06888889},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4","depth":25,"bounds":{"left":0.76458335,"top":0.36666667,"width":0.21597221,"height":0.06888889},"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20574](","depth":24,"bounds":{"left":0.76458335,"top":0.41555557,"width":0.075,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20574","depth":24,"bounds":{"left":0.76458335,"top":0.44,"width":0.18402778,"height":0.044444446},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20574","depth":25,"bounds":{"left":0.76458335,"top":0.44,"width":0.18402778,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"): panorama pdf add header section (#467) (steliyan-g)","depth":24,"bounds":{"left":0.76458335,"top":0.46444446,"width":0.19097222,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"[5301082](","depth":24,"bounds":{"left":0.76458335,"top":0.5133333,"width":0.049305554,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74","depth":24,"bounds":{"left":0.76458335,"top":0.5377778,"width":0.21666667,"height":0.044444446},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74","depth":25,"bounds":{"left":0.76458335,"top":0.5377778,"width":0.21666667,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20575](","depth":24,"bounds":{"left":0.76458335,"top":0.58666664,"width":0.063194446,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20575","depth":24,"bounds":{"left":0.76458335,"top":0.6111111,"width":0.18402778,"height":0.044444446},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20575","depth":25,"bounds":{"left":0.76458335,"top":0.6111111,"width":0.18402778,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"): panorama reports absolute links (#466) (steliyan-g)","depth":24,"bounds":{"left":0.76458335,"top":0.63555557,"width":0.21666667,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"[11f99de](","depth":24,"bounds":{"left":0.76458335,"top":0.6844444,"width":0.045833334,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5","depth":24,"bounds":{"left":0.76458335,"top":0.7088889,"width":0.21458334,"height":0.06888889},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5","depth":25,"bounds":{"left":0.76458335,"top":0.7088889,"width":0.21458334,"height":0.06888889},"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20571](","depth":24,"bounds":{"left":0.76458335,"top":0.75777775,"width":0.06875,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20571","depth":24,"bounds":{"left":0.76458335,"top":0.7822222,"width":0.18402778,"height":0.044444446},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20571","depth":25,"bounds":{"left":0.76458335,"top":0.7822222,"width":0.18402778,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"): Panorama offline reports (#465) (steliyan-g)","depth":24,"bounds":{"left":0.76458335,"top":0.8066667,"width":0.18402778,"height":0.044444446},"role_description":"text"},{"role":"AXStaticText","text":"[8cf63ce](","depth":24,"bounds":{"left":0.76458335,"top":0.85555553,"width":0.04375,"height":0.032222223},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c","depth":24,"bounds":{"left":0.76458335,"top":0.88,"width":0.21527778,"height":0.007777778},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c","depth":25,"bounds":{"left":0.76458335,"top":0.88,"width":0.21527778,"height":0.007777778},"role_description":"text"},{"role":"AXStaticText","text":") - [JY-19982](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-19982","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-19982","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"): Allow multiple LLM evals with one command run (#464) (steliyan-g)","depth":24,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":25,"bounds":{"left":0.8048611,"top":0.27222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":25,"bounds":{"left":0.82708335,"top":0.27222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":25,"bounds":{"left":0.84930557,"top":0.27222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":25,"bounds":{"left":0.8715278,"top":0.27222222,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":25,"bounds":{"left":0.89375,"top":0.27222222,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":25,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":25,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":25,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 11:49:35 AM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"11:49","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"New commits deployed to Prophet Prod-EU:","depth":24,"role_description":"text"},{"role":"AXStaticText","text":"[078d4ed](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4","depth":25,"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20574](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20574","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20574","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"): panorama pdf add header section (#467) (steliyan-g)","depth":24,"role_description":"text"},{"role":"AXStaticText","text":"[5301082](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74","depth":25,"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20575](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20575","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20575","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"): panorama reports absolute links (#466) (steliyan-g)","depth":24,"role_description":"text"},{"role":"AXStaticText","text":"[11f99de](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5","depth":25,"role_description":"text"},{"role":"AXStaticText","text":") - [JY-20571](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-20571","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-20571","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"): Panorama offline reports (#465) (steliyan-g)","depth":24,"role_description":"text"},{"role":"AXStaticText","text":"[8cf63ce](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c","depth":25,"role_description":"text"},{"role":"AXStaticText","text":") - [JY-19982](","depth":24,"role_description":"text"},{"role":"AXLink","text":"https://jiminny.atlassian.net/browse/JY-19982","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://jiminny.atlassian.net/browse/JY-19982","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"): Allow multiple LLM evals with one command run (#464) (steliyan-g)","depth":24,"role_description":"text"},{"role":"AXTextArea","text":"","depth":23,"bounds":{"left":0.7347222,"top":0.88,"width":0.24722221,"height":0.04222222},"value":"","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"loading…","depth":11,"role_description":"text"},{"role":"AXStaticText","text":"Channel releases","depth":11,"role_description":"text"}]...
|
8412489131564936239
|
-4111763792589817343
|
visual_change
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Vasil Vasilev
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Files
Files
Bookmarks
Bookmarks
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
GitHub
APP
Apr 9th at 7:07:11 PM
7:07 PM
3 new commits
3 new commits
pushed to
master
master
by
mihailmihaylovjiminny
mihailmihaylovjiminny
a3a45d3a
a3a45d3a
- JY-20634: Fix legacy sentence segments
eacdcce0
eacdcce0
- JY-20634: Add comments
09c3f776
09c3f776
- Merge pull request #11943 from jiminny/JY-20634-transcription-issue-timings
jiminny/app
jiminny/app
|
Added by
GitHub
GitHub
CircleCI
APP
Apr 9th at 7:33:52 PM
7:33 PM
Deployment Successful! tada emoji
Deployment Successful!
Project
: app
When
: 04/09/2026 16:33:51
Tag
:
View Job
View Job
Jump to date
New
CircleCI
APP
Today at 11:49:13 AM
11:49 AM
New commits deployed to Prophet Prod-US:
[078d4ed](
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
) - [JY-20574](
https://jiminny.atlassian.net/browse/JY-20574
https://jiminny.atlassian.net/browse/JY-20574
): panorama pdf add header section (#467) (steliyan-g)
[5301082](
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
) - [JY-20575](
https://jiminny.atlassian.net/browse/JY-20575
https://jiminny.atlassian.net/browse/JY-20575
): panorama reports absolute links (#466) (steliyan-g)
[11f99de](
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
) - [JY-20571](
https://jiminny.atlassian.net/browse/JY-20571
https://jiminny.atlassian.net/browse/JY-20571
): Panorama offline reports (#465) (steliyan-g)
[8cf63ce](
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
) - [JY-19982](
https://jiminny.atlassian.net/browse/JY-19982
https://jiminny.atlassian.net/browse/JY-19982
): Allow multiple LLM evals with one command run (#464) (steliyan-g)
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 11:49:35 AM
11:49
New commits deployed to Prophet Prod-EU:
[078d4ed](
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4
) - [JY-20574](
https://jiminny.atlassian.net/browse/JY-20574
https://jiminny.atlassian.net/browse/JY-20574
): panorama pdf add header section (#467) (steliyan-g)
[5301082](
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74
) - [JY-20575](
https://jiminny.atlassian.net/browse/JY-20575
https://jiminny.atlassian.net/browse/JY-20575
): panorama reports absolute links (#466) (steliyan-g)
[11f99de](
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5
) - [JY-20571](
https://jiminny.atlassian.net/browse/JY-20571
https://jiminny.atlassian.net/browse/JY-20571
): Panorama offline reports (#465) (steliyan-g)
[8cf63ce](
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c
) - [JY-19982](
https://jiminny.atlassian.net/browse/JY-19982
https://jiminny.atlassian.net/browse/JY-19982
): Allow multiple LLM evals with one command run (#464) (steliyan-g)
loading…
Channel releases
SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08]staging.INFO: [automated-reports] Checking conditions {"isMondaid":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a[2026-04-14 10:46:08]ab83a0f5432"}staging. INFO: [automated-reports] Processing daily reports{"c[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca®"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-fiminny"'} ("correlation-id' : 5c2se861-2ca -4792-9f87-773 e8oca[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"c[automated-reports] Automated reportfound Test 6[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#|+HomeDMsActivityFilesLater.*•More>0 ldl§ Support Daily - in 1h 4 m100% CTue 14 Apr 13:56:12+→Search Jiminny IncJiminny ...+tscnicre# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...# releases8 226 0• Messages@ Files@ Bookmarks+Direct messages3Aneliya Angelova, ...R. Steliyan GeorgievAdelina Petrova, Ili...%. Adelina Petrova Ee Galya Dimitrova "€. Vasil Vasilev0g Nikolay Nikolov "}2 Galya Dimitrova, Ni...2Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGooglecale... lsThursday, April 9th~View JobToday ~NewXCircleCl APP 11:49 AMNew commits deployed to Prophet Prod-US:[078d4ed](https://github.com/jiminny/prophet/commit/078d4ed30d869bd52abbc9aec4e6740c088543d4) - [JY-20574](https://jiminny.atlassian.net/browse/JY-20574): panorama pdf add header section(#467) (steliyan-g)(5301082)(https://github.com/jiminny/prophet/commit/5301082487ecdc94fdf10a3b04be5ddf68fafe74) - JY-20575](https://jiminny.atlassian.net/browse/JY-20575): panorama reports absolute links (#466)(steliyan-g)[11f99de](https://github.com/jiminny/prophet/commit/11f99de0e313c9249e2ebc8b256855f58e5bf1f5) - JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)[8cf63ce]Message #releases+ Аа...
|
12222
|
|
12321
|
NULL
|
0
|
2026-04-14T11:05:00.689167+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164700689_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"34","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\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12308
|
|
12322
|
NULL
|
0
|
2026-04-14T11:05:01.014837+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164701014_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.6171875,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.6273438,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.64023435,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.6503906,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.6605469,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.6734375,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6863281,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.7175781,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.73046875,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.94257814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.96953124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.978125,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"bounds":{"left":0.54765624,"top":0.13055556,"width":0.0140625,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.5640625,"top":0.13055556,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"34","depth":4,"bounds":{"left":0.5757812,"top":0.13055556,"width":0.012109375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.58984375,"top":0.12916666,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.5984375,"top":0.12916666,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12312
|
|
12323
|
262
|
0
|
2026-04-14T11:05:30.934588+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164730934_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"34","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\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12308
|
|
12324
|
263
|
0
|
2026-04-14T11:05:31.352076+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776164731352_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.6171875,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.6273438,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.64023435,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.6503906,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.6605469,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.6734375,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6863281,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.7175781,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.73046875,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.94257814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.96953124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.978125,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"bounds":{"left":0.54765624,"top":0.13055556,"width":0.0140625,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.5640625,"top":0.13055556,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"34","depth":4,"bounds":{"left":0.5757812,"top":0.13055556,"width":0.012109375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.58984375,"top":0.12916666,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.5984375,"top":0.12916666,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12312
|
|
12341
|
NULL
|
0
|
2026-04-14T11:10:03.302650+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165003302_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"34","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\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12331
|
|
12342
|
NULL
|
0
|
2026-04-14T11:10:04.671037+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165004671_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.6171875,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.6273438,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.64023435,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.6503906,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.6605469,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.6734375,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6863281,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.7175781,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.73046875,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.94257814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.96953124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.978125,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"102","depth":4,"bounds":{"left":0.54765624,"top":0.13055556,"width":0.0140625,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.5640625,"top":0.13055556,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"34","depth":4,"bounds":{"left":0.5757812,"top":0.13055556,"width":0.012109375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.58984375,"top":0.12916666,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.5984375,"top":0.12916666,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Services\\Kiosk\\AutomatedReports;\n\nuse Carbon\\CarbonImmutable;\nuse Carbon\\CarbonInterface;\nuse Carbon\\Exceptions\\InvalidFormatException;\nuse DateTime;\nuse DateTimeInterface;\nuse DateTimeZone;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Log;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Jiminny\\Component\\ActivitySearch\\FilterDefinition\\InputTypeEnum;\nuse Jiminny\\Component\\AskAnything\\AskAnythingPromptService;\nuse Jiminny\\Component\\AskAnything\\Dtos\\AskAnythingPromptDto;\nuse Jiminny\\Component\\UrlGenerator\\Webhook;\nuse Jiminny\\Contracts\\Repositories\\PlaybookCategoryRepository;\nuse Jiminny\\Contracts\\Repositories\\TeamRepository;\nuse Jiminny\\Contracts\\Repositories\\UserRepository;\nuse Jiminny\\Exceptions\\ApplicationException;\nuse Jiminny\\Exceptions\\InvalidArgumentException;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\Activity\\Search;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPrompt;\nuse Jiminny\\Models\\AskAnything\\AskAnythingPromptTarget;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Contracts\\UserContract;\nuse Jiminny\\Models\\Feature\\FeatureEnum;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AskAnythingRepository;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Repositories\\GroupRepository;\nuse Jiminny\\Repositories\\SearchRepository;\nuse Jiminny\\Repositories\\StageRepository;\nuse Throwable;\n\nclass AutomatedReportsService\n{\n public const string TYPE_LOSS_ANALYSIS = 'loss_analysis';\n public const string TYPE_ASK_JIMINNY = 'ask_jiminny';\n\n /**\n * Standard report types (used by kiosk for existing automated reports).\n */\n // @TODO this will add filter, however if we need to control feature by FF we need conditional logic\n public const array TYPES = [\n ['id' => 'exec_summary', 'name' => 'Exec Summary'],\n ['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],\n ['id' => 'product_feedback', 'name' => 'Product Feedback'],\n ['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],\n// ['id' => 'questions', 'name' => 'Questions'],\n// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],\n ];\n\n public const array ALL_TYPES = [\n ...self::TYPES,\n ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],\n ];\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\n /**\n * Frequencies for standard (non-Ask Jiminny) reports.\n */\n public const array FREQUENCIES = [\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n\n /**\n * Frequencies for Ask Jiminny reports.\n */\n public const array ASK_JIMINNY_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ];\n\n public const string MEDIA_TYPE_PDF = 'pdf';\n public const string MEDIA_TYPE_PODCAST = 'podcast';\n public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];\n public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];\n public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];\n public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];\n\n public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];\n public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];\n public const int SENT_REPORT_AT_HOURS = 5;\n public const string PDF_KEY = 'pdf';\n public const string AUDIO_KEY = 'audio';\n\n private const array ALL_FREQUENCIES = [\n ['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],\n ['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],\n ['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],\n ['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],\n ['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],\n ];\n private const string S3_DIR = 'reports';\n private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];\n private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];\n\n public function __construct(\n private readonly TeamRepository $teamRepository,\n private readonly GroupRepository $groupRepository,\n private readonly UserRepository $userRepository,\n private readonly StageRepository $stageRepository,\n private readonly DealStagesService $dealStagesService,\n private readonly RecipientsService $recipientsService,\n private readonly AutomatedReportsRepository $automatedReportsRepository,\n private readonly Webhook $webhookService,\n private readonly BusDispatcher $dispatcher,\n private readonly ActivityTypeService $activityTypeService,\n private readonly PlaybookCategoryRepository $playbookCategoryRepository,\n private readonly AskAnythingPromptService $askAnythingPromptService,\n private readonly SearchRepository $activitySearchRepository,\n private readonly AskAnythingRepository $askAnythingRepository,\n ) {\n }\n\n public static function getTypes(): array\n {\n $types = self::TYPES;\n\n return array_map(static function ($type) {\n return $type['id'];\n }, $types);\n }\n\n public static function getCallTypes(): array\n {\n return array_map(static function ($callType) {\n return $callType['id'];\n }, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);\n }\n\n public static function getFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::FREQUENCIES);\n }\n\n // front-facing structure\n public function getReportEnabledFieldData(bool $value = false): array\n {\n return [\n 'id' => 'report_enabled',\n 'label' => '',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'value' => $value,\n ];\n }\n\n // Organizations = Teams\n public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array\n {\n $options = $this->getTeams();\n\n if ($shortVersion) {\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'organization',\n 'label' => 'Organization',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value,\n 'dependencies' => [\n 'teams',\n 'deal_stage_at_call',\n 'current_deal_stage',\n 'recipients',\n ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,\n ],\n 'dependsOn' => [],\n ];\n }\n\n // Teams = Groups\n public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array\n {\n if ($shortVersion) {\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'options' => $options,\n ];\n }\n\n return [\n 'id' => 'teams',\n 'label' => 'Team',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $options,\n 'value' => $value, // value should be an array of objects {id, name}\n 'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],\n 'dependsOn' => [],\n ];\n }\n\n public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array\n {\n $types = [];\n if ($team instanceof Team) {\n if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n $types = self::TYPES;\n }\n if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {\n $types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];\n }\n } else {\n $types = self::TYPES;\n }\n\n if ($shortVersion) {\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'options' => $types,\n ];\n }\n\n return [\n 'id' => 'report_type',\n 'label' => 'Report Type',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $types,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getFrequencyFieldData(?string $value = null): array\n {\n return [\n 'id' => 'frequency',\n 'label' => 'Frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::FREQUENCIES,\n 'value' => $value,\n 'dependencies' => ['period'],\n 'dependsOn' => [],\n ];\n }\n\n public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array\n {\n return [\n 'id' => 'period',\n 'label' => 'Select one-off period',\n 'inputType' => InputTypeEnum::DATE_RANGE,\n 'required' => true,\n 'placeholder' => 'Select',\n 'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],\n 'queryParams' => [\n 'startDate' => 'start_date_period',\n 'endDate' => 'end_date_period',\n ],\n 'dependencies' => [],\n 'dependsOn' => ['frequency'],\n ];\n }\n\n public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array\n {\n return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);\n }\n\n public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);\n }\n\n public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array\n {\n return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);\n }\n\n public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'deal_value',\n 'label' => 'Deal Value',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_deal_value',\n 'max' => 'max_deal_value',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array\n {\n $value = [];\n $conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;\n $dialerOn && $value[] = self::CALL_TYPE_DIALER;\n\n return [\n 'id' => 'call_type',\n 'label' => 'Call Type',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => [\n self::CALL_TYPE_CONFERENCE,\n self::CALL_TYPE_DIALER,\n ],\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getMediaTypeFieldData(?AutomatedReport $report = null): array\n {\n $value = [];\n\n if ($report) {\n $value = $this->transformMediaTypes($report);\n }\n\n return [\n 'id' => 'media_types',\n 'label' => 'Export as',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'required' => true,\n 'options' => self::MEDIA_TYPE_OBJECTS,\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array\n {\n return [\n 'id' => 'call_duration',\n 'label' => 'Call Duration',\n 'inputType' => InputTypeEnum::INTEGER_RANGE,\n 'required' => false,\n 'value' => ['min' => $valueMin, 'max' => $valueMax],\n 'queryParams' => [\n 'min' => 'min_call_duration',\n 'max' => 'max_call_duration',\n ],\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getRecipientsFieldData(?Team $team = null, array $value = []): array\n {\n return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);\n }\n\n public function getJiminnyRecipientsFieldData(array $value = []): array\n {\n return $this->recipientsService->getJiminnyRecipientsFieldData($value);\n }\n\n public function getAdditionalPromptInputFieldData(?string $value = null): array\n {\n return [\n 'id' => 'additional_prompt_input',\n 'label' => 'Special requirements',\n 'inputType' => InputTypeEnum::TEXTAREA,\n 'required' => false,\n 'placeholder' => 'What should be the focus of the report?',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n public function getCustomReportNameFieldData(?string $value = null): array\n {\n return [\n 'id' => 'custom_name',\n 'label' => 'Custom report name',\n 'inputType' => InputTypeEnum::TEXT,\n 'required' => false,\n 'placeholder' => 'Enter custom name',\n 'value' => $value,\n 'dependencies' => [],\n 'dependsOn' => [],\n ];\n }\n\n // data providers\n public function getTeams(): array\n {\n $teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);\n\n $teamData = [];\n foreach ($teams as $team) {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n continue;\n }\n\n $teamData[] = $this->transformTeam($team);\n }\n\n return $teamData;\n }\n\n public function getTeamGroups(string $teamUuid): array\n {\n $data = [];\n $team = $this->getTeam($teamUuid);\n\n if ($team !== null) {\n $groups = $team->groups()->get();\n\n foreach ($groups as $group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n public function getTeamsGroupsOptions(array $filterTeamUuids = []): array\n {\n $data = [];\n $teams = $this->getTeams();\n\n foreach ($teams as $team) {\n if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {\n continue;\n }\n\n $data[] = [\n 'label' => $team['name'],\n 'groups' => $this->getTeamGroups($team['id']),\n ];\n }\n\n return $data;\n }\n\n public function getTeam(string $teamUuid): ?Team\n {\n return $this->teamRepository->idOrUuid($teamUuid);\n }\n\n public function getTeamById(int $teamId): ?Team\n {\n return $this->teamRepository->find($teamId);\n }\n\n public function getGroupsUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportGroups = $report->getGroups();\n foreach ($reportGroups as $groupId) {\n if ($group = $this->groupRepository->find($groupId)) {\n $uuids[] = $group->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getPlaybookCategoriesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $playbookCategories = $report->getPlaybookCategories();\n foreach ($playbookCategories as $id) {\n if ($category = $this->playbookCategoryRepository->find($id)) {\n $uuids[] = $category->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getDealAtCallStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getDealAtCallStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getCurrentDealStagesUuids(AutomatedReport $report): array\n {\n $uuids = [];\n $reportStages = $report->getCurrentDealStages();\n foreach ($reportStages as $id) {\n if ($stage = $this->stageRepository->find($id)) {\n $uuids[] = $stage->getUuid();\n }\n }\n\n return $uuids;\n }\n\n public function getUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getRecipients());\n }\n\n public function getJiminnyUsersUuids(AutomatedReport $report): array\n {\n return $this->extractUserUuids($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function extractUserUuids(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => $user->getUuid())\n ->values()\n ->all();\n }\n\n // get mail data\n public function getRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getRecipients());\n }\n\n private function getJiminnyRecipientUsers(AutomatedReport $report): array\n {\n return $this->buildRecipientUsers($report->getJiminnyRecipients());\n }\n\n /**\n * @param array<string, mixed> $recipients\n */\n private function buildRecipientUsers(array $recipients): array\n {\n $userIds = $recipients['users'] ?? [];\n\n return collect($userIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (UserContract $user) => [\n 'email' => $user->getEmailAddress(),\n 'name' => $user->getName(),\n 'timezone' => $user->getTimezone()->getName(),\n ])\n ->values()\n ->all();\n }\n\n public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array\n {\n if ($report->isAskJiminnyReport()) {\n $recipients = $this->resolveAskJiminnyRecipients($report);\n } else {\n $recipients = $this->getRecipientUsers($report);\n if ($includeJiminny) {\n $recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));\n }\n }\n\n $emails = [];\n\n return array_values(array_filter(\n $recipients,\n static function ($recipient) use (&$emails) {\n if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {\n return false;\n }\n $emails[] = $recipient['email'];\n\n return true;\n }\n ));\n }\n\n private function resolveAskJiminnyRecipients(AutomatedReport $report): array\n {\n $recipients = [];\n\n $creator = $report->getCreator();\n if ($creator !== null) {\n $recipients[] = [\n 'email' => $creator->getEmailAddress(),\n 'name' => $creator->getName(),\n 'timezone' => $creator->getTimezone()->getName(),\n ];\n }\n\n return array_merge(\n $recipients,\n $this->buildRecipientUsers($report->getRecipients()),\n $this->getGroupRecipientUsers($report),\n );\n }\n\n private function getGroupRecipientUsers(AutomatedReport $report): array\n {\n $users = [];\n foreach ($report->getGroups() as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group === null) {\n continue;\n }\n foreach ($group->getMembers() as $member) {\n $users[] = [\n 'email' => $member->getEmailAddress(),\n 'name' => $member->getName(),\n 'timezone' => $member->getTimezone()->getName(),\n ];\n }\n }\n\n return $users;\n }\n\n public function getReportTypeName(AutomatedReportResult $report): string\n {\n $type = $report->getReport()->getType();\n\n $getType = $this->transformReportType($type);\n\n return $getType['name'];\n }\n\n public function getReportPeriodName(AutomatedReportResult $report): string\n {\n $from = $report->getFromDate();\n $to = $report->getToDate();\n $frequency = $report->getReport()->getFrequency();\n\n if ($from === null || $to === null) {\n if (! $report->getReport()->isAskJiminnyReport()) {\n $invalidPeriod = $from === null ? 'from' : 'to';\n\n throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);\n }\n\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n }\n\n return $this->formatReportPeriodName($frequency, $from, $to);\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 getReportTeamsName(AutomatedReportResult $report): string\n {\n $groups = $report->getGroups();\n\n if (empty($groups)) {\n return 'All';\n }\n\n // Get group names from repository\n $groupNames = [];\n foreach ($groups as $groupId) {\n $group = $this->groupRepository->find($groupId);\n if ($group) {\n $groupNames[] = $group->getName();\n }\n }\n\n if (count($groupNames) === 1) {\n // Single team format\n $teamsName = $groupNames[0];\n } else {\n // Multiple teams format\n $teamsName = implode(', ', $groupNames);\n }\n\n return $teamsName;\n }\n\n public function getReportFileName(AutomatedReportResult $report): string\n {\n $customName = $report->getReport()->getCustomName();\n $periodName = $this->getReportPeriodName($report);\n $filenameSuffix = $this->getFilenameSuffix($report);\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $baseName = $this->getReportTypeName($report);\n\n if ($filenameSuffix) {\n $baseName .= \" {$filenameSuffix}\";\n }\n\n return $this->sanitizeFileName(\"{$baseName} - {$periodName} - {$this->getReportTeamsName($report)}\");\n }\n\n public function getReportFileNameWithExtension(AutomatedReportResult $result): string\n {\n $extension = $this->getMediaTypeMetadata($result)['extension'];\n\n return $this->getReportFileName($result) . '.' . $extension;\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n public function isUserRecipientOfReport(User $user, AutomatedReport $report): bool\n {\n $recipients = array_map('intval', $report->getRecipients()['users'] ?? []);\n\n return in_array($user->getId(), $recipients);\n }\n\n public function transformReportResults(Collection $automatedReportResults): array\n {\n $data = [];\n foreach ($automatedReportResults as $automatedReportResult) {\n /** @var AutomatedReportResult $automatedReportResult */\n\n $report = $automatedReportResult->getReport();\n\n $createdBy = $report->getCreator();\n $creator = [\n 'id' => $createdBy?->getUuid(),\n 'name' => $createdBy?->getName(),\n 'email' => $createdBy?->getEmailAddress(),\n 'photoUrl' => $createdBy?->getPhotoUrl(),\n ];\n\n $data[] = [\n 'id' => $automatedReportResult->getUuid(),\n 'name' => $automatedReportResult->getName(),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n 'recipients' => [\n ...array_values($this->transformGroups(team: $report->getTeam(), groupsIds: $report->getGroups())),\n ...array_values($this->transformRecipients($report->getRecipients())),\n ],\n 'report_type' => $this->transformReportType($report->getType()),\n 'media_type' => $automatedReportResult->getMediaType(),\n 'downloadUrl' => $this->generateReportResultDownloadUrl($automatedReportResult),\n 'viewUrl' => $this->generateReportResultViewUrl($automatedReportResult),\n 'generated_at' => $automatedReportResult->getGeneratedAt()?->toIso8601String(),\n 'creator' => $creator,\n ];\n }\n\n return $data;\n }\n\n public function hasCallTypeConference(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_CONFERENCE['id'], $report->getCallTypes(), true);\n }\n\n public function hasCallTypeDialer(AutomatedReport $report): bool\n {\n return in_array(self::CALL_TYPE_DIALER['id'], $report->getCallTypes(), true);\n }\n\n // transformers\n private function transformTeam(Team $team): array\n {\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n return [];\n }\n\n return [\n 'id' => $team->getUuid(),\n 'name' => $team->getName(),\n ];\n }\n\n private function transformReportFullView(AutomatedReport $report): array\n {\n $base = $this->transformReportBase($report);\n\n return $report->getType() === self::TYPE_ASK_JIMINNY\n ? $base + $this->transformAskJiminnyFields($report)\n : $base + $this->transformStandardReportFields($report);\n }\n\n private function transformReportBase(AutomatedReport $report): array\n {\n return [\n 'id' => $report->getUuid(),\n 'organization' => $this->transformOrganization(team: $report->getTeam()),\n 'report_type' => $this->transformReportType($report->getType()),\n 'frequency' => $this->transformFrequency($report->getFrequency()),\n ];\n }\n\n private function transformStandardReportFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n\n return [\n 'report_enabled' => $report->getStatus(),\n 'start_date_period' => $report->getFrom()?->format('Y-m-d H:i:s'),\n 'end_date_period' => $report->getTo()?->format('Y-m-d H:i:s'),\n 'deal_value_min' => $report->getDealValueMin(),\n 'deal_value_max' => $report->getDealValueMax(),\n 'call_types' => $this->transformCallType($report->getCallTypes()),\n 'media_types' => $this->transformMediaTypes($report),\n 'call_duration_min' => $this->transformDurationToMinutes($report->getCallDurationMin()),\n 'call_duration_max' => $this->transformDurationToMinutes($report->getCallDurationMax()),\n 'teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'deal_at_call_stages' => $this->transformStages(team: $team, stagesIds: $report->getDealAtCallStages()),\n 'current_deal_stages' => $this->transformStages(team: $team, stagesIds: $report->getCurrentDealStages()),\n 'recipients' => $this->transformRecipients($report->getRecipients()),\n 'created_by' => $this->transformCreator($report->getCreator()),\n 'additional_prompt_input' => $report->getAdditionalPromptInput(),\n 'custom_name' => $report->getCustomName(),\n 'created_at' => $report->getCreatedAt()->format('Y-m-d H:i:s'),\n 'updated_at' => $report->getUpdatedAt()->format('Y-m-d H:i:s'),\n 'deleted_at' => $report->getDeletedAt()?->format('Y-m-d H:i:s'),\n ];\n }\n\n private function transformAskJiminnyFields(AutomatedReport $report): array\n {\n $team = $report->getTeam();\n $creatorId = $report->getAttribute('created_by');\n $explicitUserIds = array_values(array_filter(\n $report->getRecipients()['users'] ?? [],\n static fn ($id) => $id !== $creatorId\n ));\n\n return [\n 'report_name' => $report->getCustomName(),\n 'enabled' => $report->getStatus(),\n 'share_teams' => $this->transformGroups(team: $team, groupsIds: $report->getGroups()),\n 'share_users' => $this->transformRecipients(['users' => $explicitUserIds]),\n 'saved_search' => $this->transformSafeSearch($report->getSavedSearch()),\n 'ask_jiminny_prompt' => $this->transformAskJiminnyPrompt($report->getAskAnythingPrompt()),\n 'expires_on' => $report->getExpiresAt()?->format('Y-m-d'),\n ];\n }\n\n private function transformOrganization(?Team $team): array\n {\n return [\n 'id' => $team?->getUuid(),\n 'name' => $team?->getName(),\n ];\n }\n\n private function transformReportType(string $type): array\n {\n foreach (self::ALL_TYPES as $typeItem) {\n if ($typeItem['id'] === $type) {\n return $typeItem;\n }\n }\n\n return [];\n }\n\n private function transformCallType(array $types): array\n {\n $result = [];\n $callTypes = [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER];\n\n foreach ($types as $type) {\n foreach ($callTypes as $callTypeItem) {\n if ($callTypeItem['id'] === $type) {\n $result[] = $callTypeItem;\n\n break;\n }\n }\n }\n\n return $result;\n }\n\n private function transformMediaTypes(AutomatedReport $report): array\n {\n $values = [];\n\n foreach ($report->getMediaTypes() as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n continue;\n }\n\n $values[] = match ($mediaType) {\n self::MEDIA_TYPE_PDF => self::MEDIA_TYPE_OBJECT_PDF,\n self::MEDIA_TYPE_PODCAST => self::MEDIA_TYPE_OBJECT_PODCAST,\n };\n }\n\n return $values;\n }\n\n private function transformFrequency(string $frequency): array\n {\n foreach (self::ALL_FREQUENCIES as $frequencyItem) {\n if ($frequencyItem['id'] === $frequency) {\n return $frequencyItem;\n }\n }\n\n return [];\n }\n\n public function transformDurationToMinutes(?int $duration): ?int\n {\n if (! $duration) {\n return null;\n }\n\n return (int) ($duration / 60);\n }\n\n private function transformGroups(?Team $team, array $groupsIds): array\n {\n if (empty($groupsIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($groupsIds as $groupId) {\n $group = $team->groups()->where('id', $groupId)->first();\n\n if ($group) {\n $data[] = [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n 'photoUrl' => $group->getPhotoUrl(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformStages(?Team $team, array $stagesIds): array\n {\n if (empty($stagesIds) || ! $team) {\n return [];\n }\n\n $data = [];\n foreach ($stagesIds as $stageId) {\n $stage = $team->stages()->where('id', $stageId)->first();\n\n if ($stage) {\n $data[] = [\n 'id' => $stage->getUuid(),\n 'name' => $stage->getName(),\n ];\n }\n }\n\n return $data;\n }\n\n private function transformRecipients(array $recipients): array\n {\n $users = [];\n foreach ($recipients['users'] ?? [] as $userId) {\n $users[] = $this->transformUser($userId);\n }\n\n return $users;\n }\n\n private function transformCreator(?User $user): ?array\n {\n if ($user === null) {\n return null;\n }\n\n return $this->transformUser($user->getId());\n }\n\n private function transformAskJiminnyPrompt(?AskAnythingPrompt $prompt): ?array\n {\n if ($prompt === null) {\n return null;\n }\n\n return [\n 'id' => $prompt->getUuid(),\n 'name' => $prompt->getTitle(),\n ];\n }\n\n private function transformSafeSearch(?Search $search): ?array\n {\n if ($search === null) {\n return null;\n }\n\n return [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ];\n }\n\n private function transformUser(int $userId): array\n {\n /* @var ?User $user */\n $user = $this->userRepository->find($userId);\n\n return [\n 'id' => $user?->getUuid(),\n 'name' => $user?->getName(),\n 'email' => $user?->getEmailAddress(),\n 'photoUrl' => $user?->getPhotoUrl(),\n ];\n }\n\n public function create(array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $validatedData['created_by'] = auth()->id();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function update(string $uuid, array $data): array\n {\n $validatedData = $this->validateAndTransformData($data);\n $report = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $report) {\n throw new InvalidArgumentException('Report not found');\n }\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Create an Ask Jiminny report.\n */\n public function createAskJiminnyReport(array $data, User $creator): array\n {\n $validatedData = $this->validateAskJiminnyReportData($data, $creator);\n $validatedData['created_by'] = $creator->getId();\n\n $automatedReport = $this->automatedReportsRepository->create($validatedData);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n /**\n * Update an Ask Jiminny report.\n */\n public function updateAskJiminnyReport(AutomatedReport $report, array $data, User $user): array\n {\n if (! $report->isAskJiminnyReport()) {\n throw new InvalidArgumentException('Report is not an Ask Jiminny report');\n }\n\n $validatedData = $this->validateAskJiminnyReportData($data, $user);\n\n $oldCustomName = $report->getCustomName();\n\n $automatedReport = $this->automatedReportsRepository->update($report, $validatedData);\n\n if ($oldCustomName !== $automatedReport->getCustomName()) {\n $this->updateResultNames($automatedReport);\n }\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function updateAskJiminnyReportStatus(AutomatedReport $report, bool $status): array\n {\n $this->automatedReportsRepository->update($report, ['status' => $status]);\n\n return $this->transformReportFullView($report->fresh());\n }\n\n /**\n * Validate and transform data for Ask Jiminny reports.\n */\n private function validateAskJiminnyReportData(array $data, User $user): array\n {\n // Validate name\n $name = trim($data['report_name'] ?? '');\n if (empty($name)) {\n throw new InvalidArgumentException('Report name is required');\n }\n if (mb_strlen($name) > 50) {\n throw new InvalidArgumentException('Report name must be 50 characters or less');\n }\n\n // Validate frequency (only daily, weekly, monthly for Ask Jiminny)\n $frequency = $data['frequency'] ?? null;\n $askJiminnyFrequencies = [self::FREQUENCY_DAILY, self::FREQUENCY_WEEKLY, self::FREQUENCY_MONTHLY];\n if (! in_array($frequency, $askJiminnyFrequencies, true)) {\n throw new InvalidArgumentException('Frequency must be daily, weekly, or monthly');\n }\n\n // Validate expiration date\n $expiresAt = $data['expires_on'] ?? null;\n if (empty($expiresAt)) {\n throw new InvalidArgumentException('Expiration date is required');\n }\n\n try {\n $expiresAtDate = Carbon::parse($expiresAt);\n } catch (InvalidFormatException $e) {\n throw new InvalidArgumentException('Expiration date format is invalid');\n }\n $maxExpiration = Carbon::now()->addYear();\n if ($expiresAtDate->gt($maxExpiration)) {\n throw new InvalidArgumentException('Expiration date cannot be more than 1 year from now');\n }\n if ($expiresAtDate->isPast()) {\n throw new InvalidArgumentException('Expiration date cannot be in the past');\n }\n\n // Validate saved search\n $activitySearchId = $data['saved_search'] ?? null;\n if (empty($activitySearchId)) {\n throw new InvalidArgumentException('Saved search is required');\n }\n $savedSearch = $this->activitySearchRepository->findByUuidAndUser($activitySearchId, $user);\n if (! $savedSearch) {\n throw new InvalidArgumentException('Saved search not found or does not belong to you');\n }\n\n // Validate saved prompt\n $askAnythingPromptId = $data['ask_jiminny_prompt'] ?? null;\n if (empty($askAnythingPromptId)) {\n throw new InvalidArgumentException('Ask Jiminny prompt is required');\n }\n $prompt = $this->askAnythingRepository->getPromptByUuid($askAnythingPromptId);\n if (! $prompt) {\n throw new InvalidArgumentException('Ask Jiminny prompt not found');\n }\n\n // Validate status\n $status = $data['enabled'] ?? false;\n\n $recipientUserIds = [$user->getId()];\n\n if (! empty($data['share_users'])) {\n $sharedUserIds = $this->validateAndGetUserIdsByTeam(\n $user->team,\n (array) $data['share_users']\n );\n $recipientUserIds = array_merge($recipientUserIds, $sharedUserIds);\n }\n\n $sharedGroupIds = [];\n if (! empty($data['share_teams'])) {\n $sharedGroupIds = $this->validateAndGetGroupIds($user->team, (array) $data['share_teams']);\n }\n\n $recipientUserIds = array_values(array_unique($recipientUserIds));\n\n return [\n 'team_id' => $user->getTeamId(),\n 'type' => self::TYPE_ASK_JIMINNY,\n 'status' => (bool) $status,\n 'frequency' => $frequency,\n 'custom_name' => $name,\n 'activity_search_id' => $savedSearch->getId(),\n 'ask_anything_prompt_id' => $prompt->getId(),\n 'expires_at' => $expiresAtDate->toDateString(),\n 'media_types' => [self::MEDIA_TYPE_PDF],\n 'call_types' => [],\n 'recipients' => ['users' => $recipientUserIds],\n 'groups' => $sharedGroupIds,\n ];\n }\n\n public static function getAskJiminnyFrequencies(): array\n {\n return array_map(static function ($frequency) {\n return $frequency['id'];\n }, self::ASK_JIMINNY_FREQUENCIES);\n }\n\n public function getAskJiminnyReportFilters(User $user): array\n {\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n return [\n [\n 'id' => 'prompt',\n 'label' => 'Prompt',\n 'options' => $prompts,\n ],\n [\n 'id' => 'saved_search',\n 'label' => 'Saved Search',\n 'options' => $savedSearches,\n ],\n ];\n }\n\n public function getAskJiminnyReportFormData(User $user, ?AutomatedReport $report = null): array\n {\n $team = $user->getTeam();\n $userTimezone = $user->getTimezone();\n\n $savedSearches = $this->activitySearchRepository->findByUserOrderedByName($user)\n ->map(fn (Search $search) => [\n 'id' => $search->getUuid(),\n 'name' => $search->getName(),\n ])\n ->values()->all();\n\n $prompts = collect(\n $this->askAnythingPromptService->get($user, AskAnythingPromptTarget::on_demand)\n )->map(fn (AskAnythingPromptDto $prompt) => [\n 'id' => $prompt->id,\n 'name' => $prompt->title,\n ])->values()->all();\n\n $teamGroups = $this->groupRepository->getAllByTeam($team)->map(fn ($group) => [\n 'id' => $group->getUuid(),\n 'name' => $group->getName(),\n ])->values()->all();\n\n $shareUsers = $this->recipientsService->getRecipientsFieldData(team: $team)['options'] ?? [];\n\n $sharedTeamsValue = [];\n $sharedUsersValue = [];\n if ($report) {\n $sharedTeamsValue = $this->transformGroups($team, $report->getGroups());\n\n $recipientUserIds = $report->getRecipients()['users'] ?? [];\n $creatorId = $report->getAttribute('created_by');\n $sharedUserIds = array_values(array_filter(\n $recipientUserIds,\n static fn ($id) => $id !== $creatorId\n ));\n $sharedUsersValue = collect($sharedUserIds)\n ->map(fn ($id) => $this->userRepository->find((int) $id))\n ->filter()\n ->map(fn (User $u) => [\n 'id' => $u->getUuid(),\n 'name' => $u->getName(),\n ])\n ->values()\n ->all();\n }\n\n return [\n 'fields' => [\n [\n 'id' => 'enabled',\n 'inputType' => InputTypeEnum::TOGGLE,\n 'label' => '',\n 'value' => $report?->getStatus() ?? false,\n ],\n [\n 'id' => 'report_name',\n 'inputType' => InputTypeEnum::TEXT,\n 'label' => 'Name',\n 'placeholder' => 'Enter name',\n 'required' => true,\n 'validation' => ['maxLength' => 50],\n 'value' => $report?->getCustomName() ?? '',\n ],\n [\n 'id' => 'frequency',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Frequency',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => self::ASK_JIMINNY_FREQUENCIES,\n 'value' => $report ? $this->transformFrequency($report->getFrequency()) : null,\n ],\n [\n 'id' => 'expires_on',\n 'inputType' => InputTypeEnum::DATE,\n 'label' => 'Expires on',\n 'required' => true,\n 'placeholder' => 'Select',\n 'validation' => [\n 'minDate' => now($userTimezone)->toDateString(),\n 'maxDate' => now($userTimezone)->addYear()->toDateString(),\n ],\n 'value' => $report?->getExpiresAt()?->toDateString(),\n ],\n [\n 'id' => 'share_teams',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team',\n 'required' => false,\n 'placeholder' => 'Select',\n 'options' => $teamGroups,\n 'value' => $sharedTeamsValue,\n ],\n [\n 'id' => 'share_users',\n 'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,\n 'label' => 'Team member',\n 'required' => false,\n 'placeholder' => 'Select',\n 'groupLabelKey' => 'label',\n 'groupValuesKey' => 'users',\n 'optionLabelKey' => 'name',\n 'optionValueKey' => 'id',\n 'options' => $shareUsers,\n 'value' => $sharedUsersValue,\n ],\n [\n 'id' => 'saved_search',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Saved search',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $savedSearches,\n 'value' => $report && $report->getSavedSearch() ? [\n 'id' => $report->getSavedSearch()->getUuid(),\n 'name' => $report->getSavedSearch()->getName(),\n ] : null,\n ],\n [\n 'id' => 'ask_jiminny_prompt',\n 'inputType' => InputTypeEnum::DROPDOWN,\n 'label' => 'Ask Jiminny prompt',\n 'required' => true,\n 'placeholder' => 'Select',\n 'options' => $prompts,\n 'value' => $report && $report->getAskAnythingPrompt() ? [\n 'id' => $report->getAskAnythingPrompt()->getUuid(),\n 'name' => $report->getAskAnythingPrompt()->getTitle(),\n ] : null,\n ],\n ],\n ];\n }\n\n private function updateResultNames(AutomatedReport $automatedReport): void\n {\n $results = $this->automatedReportsRepository->getResultsByReport($automatedReport);\n\n foreach ($results as $result) {\n $result->update(['name' => $this->getReportFileName($result)]);\n }\n }\n\n public function updateStatus(string $uuid, array $data): array\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $automatedReport->update([\n 'status' => $status,\n ]);\n\n $this->generateOneOffReport($automatedReport);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n private function generateOneOffReport(AutomatedReport $automatedReport): void\n {\n // the scheduler handles all the other frequency types\n if ($automatedReport->getStatus() === false || $automatedReport->getFrequency() !== self::FREQUENCY_ONE_OFF) {\n return;\n }\n\n $this->dispatcher->dispatch(new RequestGenerateReportJob($automatedReport->getUuid()));\n }\n\n public function getReport(string $uuid): AutomatedReport\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n return $automatedReport;\n }\n\n public function get(string $uuid): array\n {\n $automatedReport = $this->getReport($uuid);\n\n return $this->transformReportFullView($automatedReport);\n }\n\n public function list(string $sortColumn = 'created_at', string $sortDirection = 'desc'): array\n {\n $results = [];\n $collection = $this->automatedReportsRepository->getAllStandardReports($sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function listAskJiminnyReports(\n User $user,\n string $sortColumn = 'created_at',\n string $sortDirection = 'desc'\n ): array {\n $results = [];\n $collection = $this->automatedReportsRepository->getAskJiminnyReportsByUser($user, $sortColumn, $sortDirection);\n\n /** @var AutomatedReport $report */\n foreach ($collection as $report) {\n $results[] = $this->transformReportFullView($report);\n }\n\n return ['data' => $results];\n }\n\n public function delete(string $uuid): void\n {\n $automatedReport = $this->automatedReportsRepository->findByUuid($uuid);\n\n if (! $automatedReport) {\n throw new ModelNotFoundException('Report not found');\n }\n\n $automatedReport->delete();\n }\n\n public function createReportResult(AutomatedReport $automatedReport, array $data = []): AutomatedReportResult\n {\n return $this->automatedReportsRepository->createResult(\n array_merge(\n [\n 'report_id' => $automatedReport->getId(),\n 'status' => AutomatedReportResult::STATUS_DEFAULT,\n ],\n $data\n )\n );\n }\n\n public function getReportResult(string $resultUuid): AutomatedReportResult\n {\n $report = $this->automatedReportsRepository->findResultByUuid($resultUuid);\n\n if (! $report) {\n throw new ModelNotFoundException('Report Result not found');\n }\n\n return $report;\n }\n\n public function findChildResult(AutomatedReportResult $result, string $type): ?AutomatedReportResult\n {\n return $this->automatedReportsRepository->findChildResult($result, $type);\n }\n\n // prophet API calls\n /**\n * @throws ApplicationException\n */\n public function getGenerateReportPayload(AutomatedReport $automatedReport, string $reportResultUuid): array\n {\n $period = $this->calculateFromAndToDate($automatedReport);\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n return [\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResultUuid,\n 'report_type' => $automatedReport->getType(),\n 'media_types' => $automatedReport->getMediaTypes(),\n 'from_date' => $fromDate->startOfDay()->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->endOfDay()->format(DateTimeInterface::RFC3339),\n 'group_ids' => $automatedReport->getGroups(),\n 'call_deal_stage' => $automatedReport->getDealAtCallStages(),\n 'current_deal_stage' => $automatedReport->getCurrentDealStages(),\n 'deal_min_value' => $automatedReport->getDealValueMin(),\n 'deal_max_value' => $automatedReport->getDealValueMax(),\n 'call_types' => $automatedReport->getCallTypes(),\n 'call_duration_min_seconds' => $automatedReport->getCallDurationMin(),\n 'call_duration_max_seconds' => $automatedReport->getCallDurationMax(),\n 'special_requirements' => $automatedReport->getAdditionalPromptInput(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->formatReportPeriodName(\n $automatedReport->getFrequency(),\n $fromDate,\n $toDate,\n ),\n 'playbook_categories' => $automatedReport->getPlaybookCategories(),\n 'custom_name' => $automatedReport->getCustomName(),\n ];\n }\n\n // $inputPayload - FE payload structure\n public function getActivitiesCountPayload(array $inputPayload): array\n {\n // Use validateAndTransformData to validate and normalize input\n $validatedData = $this->validateAndTransformData($inputPayload);\n $period = $this->calculateFromAndToDatePeriod(\n $validatedData['frequency'],\n Carbon::parse($validatedData['from']),\n Carbon::parse($validatedData['to']),\n );\n $fromDate = $period['fromDate'];\n $toDate = $period['toDate'];\n\n // Create payload similar to getGenerateReportPayload\n return [\n 'team_id' => $validatedData['team_id'],\n 'group_ids' => $validatedData['groups'] ?? [],\n 'report_type' => $validatedData['type'],\n 'from_date' => $fromDate->format(DateTimeInterface::RFC3339),\n 'to_date' => $toDate->format(DateTimeInterface::RFC3339),\n 'call_deal_stage' => $validatedData['deal_at_call_stages'] ?? [],\n 'current_deal_stage' => $validatedData['current_deal_stages'] ?? [],\n 'deal_min_value' => $validatedData['deal_value_min'] ?? null,\n 'deal_max_value' => $validatedData['deal_value_max'] ?? null,\n 'call_types' => $validatedData['call_types'],\n 'call_duration_min_seconds' => $validatedData['call_duration_min'] ?? null,\n 'call_duration_max_seconds' => $validatedData['call_duration_max'] ?? null,\n 'special_requirements' => $validatedData['additional_prompt_input'] ?? null,\n 'playbook_categories' => $validatedData['playbook_categories'] ?? [],\n 'request_id' => null,\n 'callback_url' => null,\n ];\n }\n\n public function shouldSendReport(array $users, ?CarbonInterface $generatedAt = null): bool\n {\n if (empty($users)) {\n return false;\n }\n\n $earliestTz = collect($users)\n ->mapWithKeys(function (array $user) {\n $tz = new DateTimeZone($user['timezone']);\n $nowUtc = new DateTime('now', new DateTimeZone('UTC'));\n $offset = $tz->getOffset($nowUtc);\n\n return [$user['timezone'] => $offset];\n })\n ->sortDesc()\n ->keys()\n ->first();\n\n $now = Carbon::now($earliestTz);\n $isScheduledTime = (int) $now->format('H') === self::SENT_REPORT_AT_HOURS;\n\n if ($isScheduledTime) {\n return true;\n }\n\n return $this->hasPassedScheduledTime($generatedAt, $earliestTz);\n }\n\n public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): bool\n {\n if ($generatedAt === null) {\n return false;\n }\n\n $now = Carbon::now($timezone);\n $scheduledTime = $now->copy()->setTime(self::SENT_REPORT_AT_HOURS, 0, 0);\n\n if ($now->hour < self::SENT_REPORT_AT_HOURS) {\n $scheduledTime = $scheduledTime->subDay();\n }\n\n $scheduledTimeUtc = $scheduledTime->copy()->utc();\n $generatedAtUtc = $generatedAt->copy()->utc();\n $nowUtc = $now->copy()->utc();\n\n return $generatedAtUtc->lt($scheduledTimeUtc) && $nowUtc->gt($scheduledTimeUtc);\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 calculateFromAndToDate(AutomatedReport $automatedReport): array\n {\n return $this->calculateFromAndToDatePeriod(\n $automatedReport->getFrequency(),\n $automatedReport->getFrom(),\n $automatedReport->getTo()\n );\n }\n\n public function getAskJiminnyGenerateReportPayload(\n AutomatedReport $automatedReport,\n AutomatedReportResult $reportResult,\n array $activityIds,\n ): array {\n return [\n 'user_question' => $automatedReport->getAskAnythingPrompt()?->getContent(),\n 'call_ids' => array_map('strval', $activityIds),\n 'team_id' => $automatedReport->getTeamId(),\n 'request_id' => $reportResult->getUuid(),\n 'callback_url' => $this->getCallbackUrl(),\n 'report_period' => $this->getReportPeriodName($reportResult),\n 'report_name' => $automatedReport->getCustomName(),\n ];\n }\n\n private function getCallbackUrl(): string\n {\n return $this->webhookService->route('jiminny.webhook.reports.ready');\n }\n\n /**\n * Validate and transform payload data for automated reports\n *\n * @param array $data\n *\n * @throws InvalidArgumentException\n *\n * @return array\n */\n private function validateAndTransformData(array $data): array\n {\n // Validate organization (team) and check feature\n $team = $this->validateOrganization($data['organization'] ?? null);\n\n $status = $this->validateReportStatus($data['report_enabled'] ?? null);\n $type = $this->validateReportType($data['report_type'] ?? null);\n $frequency = $this->validateFrequency($data['frequency'] ?? null);\n $additionalPromptInput = $this->validateAdditionalPromptInput(\n $data['additional_prompt_input'] ?? null\n );\n $customReportName = $this->validateCustomReportName($data['custom_name'] ?? null);\n\n // Prepare data for the database\n $reportData = [\n 'team_id' => $team->getId(),\n 'type' => $type,\n 'status' => $status,\n 'frequency' => $frequency,\n 'additional_prompt_input' => $additionalPromptInput,\n 'custom_name' => $customReportName,\n ];\n\n // Validate deal values\n $reportData = $this->validateDealValues($data, $reportData);\n\n // Validate date range\n $reportData = $this->validateDateRange($data, $reportData, $frequency);\n\n // Validate call durations\n $reportData = $this->validateCallDurations($data, $reportData);\n\n // Validate call types\n $reportData = $this->validateCallTypes($data, $reportData);\n\n // Validate media types\n $reportData = $this->validateMediaTypes($data, $reportData);\n\n // Validate groups\n if (isset($data['teams'])) {\n $reportData['groups'] = $this->validateAndGetGroupIds($team, $data['teams']);\n }\n\n // Validate deal stages\n $reportData = $this->validateDealStages($data, $reportData, $team, $type);\n\n // Validate playbook categories\n $reportData = $this->validatePlaybookCategories($data, $reportData, $team);\n\n // Validate recipients\n $reportData['recipients'] = [\n 'users' => $this->validateAndGetUserIdsByTeam($team, $data['recipients'] ?? []),\n ];\n\n if (isset($data['jiminny_recipients'])) {\n // Validate Jiminny recipients\n $reportData['jiminny_recipients'] = [\n 'users' => $this->validateAndGetJiminnyUserIds((array) $data['jiminny_recipients']),\n ];\n }\n\n return $reportData;\n }\n\n private function validateDealValues(array $data, array $reportData): array\n {\n if (isset($data['min_deal_value'])) {\n $reportData['deal_value_min'] = (int) $data['min_deal_value'];\n\n if ($reportData['deal_value_min'] > 4294967295 || $reportData['deal_value_min'] < 0) {\n throw new InvalidArgumentException('Min deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_deal_value'])) {\n $reportData['deal_value_max'] = (int) $data['max_deal_value'];\n\n if ($reportData['deal_value_max'] > 4294967295 || $reportData['deal_value_max'] < 0) {\n throw new InvalidArgumentException('Max deal value should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['min_deal_value'], $data['max_deal_value'])\n && $data['min_deal_value'] > $data['max_deal_value']\n ) {\n throw new InvalidArgumentException('Min deal value cannot be greater than max deal value');\n }\n\n return $reportData;\n }\n\n private function validateDateRange(array $data, array $reportData, string $frequency): array\n {\n // Set date range only for one_off frequency\n if ($frequency === 'one_off') {\n if (isset($data['start_date_period'])) {\n $reportData['from'] = $this->parseDate($data['start_date_period']);\n }\n\n if (isset($data['end_date_period'])) {\n $reportData['to'] = $this->parseDate($data['end_date_period']);\n }\n\n if (empty($reportData['from']) || empty($reportData['to'])) {\n throw new InvalidArgumentException(\n 'Start date and end date are required for one_off frequency'\n );\n }\n } else {\n $reportData['from'] = null;\n $reportData['to'] = null;\n }\n\n return $reportData;\n }\n\n private function validateCallDurations(array $data, array $reportData): array\n {\n // Convert call durations from minutes to seconds\n if (isset($data['min_call_duration'])) {\n $reportData['call_duration_min'] = (int) $data['min_call_duration'] * 60;\n\n if ($reportData['call_duration_min'] > 4294967295 || $reportData['call_duration_min'] < 0) {\n throw new InvalidArgumentException('Min call duration should be between 0 and 4294967295');\n }\n }\n\n if (isset($data['max_call_duration'])) {\n $reportData['call_duration_max'] = (int) $data['max_call_duration'] * 60;\n\n if ($reportData['call_duration_max'] > 4294967295 || $reportData['call_duration_max'] < 0) {\n throw new InvalidArgumentException('Max call duration should be between 0 and 4294967295');\n }\n }\n\n return $reportData;\n }\n\n private function validateCallTypes(array $data, array $reportData): array\n {\n // Set call types\n $reportData['call_types'] = $data['call_type'] ?? [];\n if (empty($reportData['call_types'])) {\n $reportData['call_types'] = self::getCallTypes();\n }\n\n foreach ($reportData['call_types'] as $callType) {\n if (! in_array($callType, self::getCallTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Call type %s is invalid', $callType));\n }\n }\n\n return $reportData;\n }\n\n private function validateMediaTypes(array $data, array $reportData): array\n {\n // Set media types from input data\n $reportData['media_types'] = $data['media_types'] ?? [];\n\n if (empty($reportData['media_types'])) {\n throw new InvalidArgumentException('Media types are required');\n }\n\n foreach ($reportData['media_types'] as $mediaType) {\n if (! in_array($mediaType, self::MEDIA_TYPES, true)) {\n throw new InvalidArgumentException(sprintf('Media type %s is invalid', $mediaType));\n }\n }\n\n return $reportData;\n }\n\n private function validateDealStages(array $data, array $reportData, Team $team, string $reportType): array\n {\n // Validate and set deal stages\n if (isset($data['deal_stage_at_call'])) {\n $reportData['deal_at_call_stages'] =\n $this->validateAndGetDealStageIds($team, $data['deal_stage_at_call'], 'Deal stage at call');\n }\n\n if (isset($data['current_deal_stage'])) {\n $reportData['current_deal_stages'] =\n $this->validateAndGetDealStageIds($team, $data['current_deal_stage'], 'Current deal stage');\n }\n\n // Ensure current_deal_stage is not provided for loss_analysis report type\n if ($reportType === self::TYPE_LOSS_ANALYSIS && ! empty($data['current_deal_stage'])) {\n throw new InvalidArgumentException('Current deal stage is not applicable for Loss Analysis reports');\n }\n\n return $reportData;\n }\n\n // transform uuid to id\n private function validatePlaybookCategories(array $data, array $reportData, Team $team): array\n {\n $key = 'playbook_categories';\n\n if (isset($data[$key])) {\n $payloadIds = $data[$key];\n $ids = [];\n\n foreach ($payloadIds as $uuid) {\n $uuid = (string) $uuid;\n\n try {\n $playbookCategory = $this->playbookCategoryRepository->findByUuid($uuid);\n } catch (Throwable $throwable) {\n Log::error(__METHOD__ . ' ' . $throwable->getMessage());\n\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory) {\n throw new InvalidArgumentException(sprintf('Playbook category %s not found', $uuid));\n }\n\n if (! $playbookCategory->hasPlaybook()) {\n throw new InvalidArgumentException(sprintf('Playbook category %s has no playbook', $uuid));\n }\n\n if ($playbookCategory->getPlaybook()->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Playbook category %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $ids[] = $playbookCategory->getId();\n }\n\n $reportData[$key] = $ids;\n }\n\n return $reportData;\n }\n\n private function validateReportStatus($status): bool\n {\n if (! in_array($status, [true, false], true)) {\n throw new InvalidArgumentException('Report status is invalid');\n }\n\n return $status;\n }\n\n private function validateReportType($type): string\n {\n if (! in_array($type, self::getTypes(), true)) {\n throw new InvalidArgumentException(sprintf('Report type is invalid: %s', $type));\n }\n\n return $type;\n }\n\n private function validateFrequency($frequency): string\n {\n if (! in_array($frequency, self::getFrequencies(), true)) {\n throw new InvalidArgumentException('Frequency is invalid');\n }\n\n return $frequency;\n }\n\n private function validateAdditionalPromptInput(?string $additionalPromptInput): ?string\n {\n if ($additionalPromptInput && strlen($additionalPromptInput) > 5000) {\n throw new InvalidArgumentException('Additional Prompt Input should be less than 5000 characters');\n }\n\n return $additionalPromptInput;\n }\n\n private function validateCustomReportName(?string $customReportName): ?string\n {\n if ($customReportName === null || $customReportName === '') {\n return null;\n }\n\n if (strlen($customReportName) > 70) {\n throw new InvalidArgumentException('Custom report name should be less than 70 characters');\n }\n\n return $customReportName;\n }\n\n private function validateOrganization(?string $organizationUuid): Team\n {\n if (! $organizationUuid) {\n throw new InvalidArgumentException('Organization is required');\n }\n\n $team = $this->teamRepository->idOrUuid($organizationUuid);\n\n if (! $team) {\n throw new InvalidArgumentException('Organization not found');\n }\n\n if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {\n throw new InvalidArgumentException('Organization does not have the Automated Reports feature');\n }\n\n return $team;\n }\n\n private function validateAndGetGroupIds(Team $team, array $teamUuids): array\n {\n $groupIds = [];\n\n foreach ($teamUuids as $uuid) {\n $group = $this->groupRepository->findByUuid($uuid);\n\n if ($group === null || $group->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Group %s not found for team %s', $uuid, $team->getUuid())\n );\n }\n\n $groupIds[] = $group->getId();\n\n }\n\n return $groupIds;\n }\n\n private function validateAndGetDealStageIds(Team $team, array $stageUuids, string $propertyLabel): array\n {\n $stageIds = [];\n\n foreach ($stageUuids as $uuid) {\n $stage = $this->stageRepository->findByUuid($uuid);\n\n if ($stage === null || $stage->getTeamId() !== $team->getId()) {\n throw new InvalidArgumentException(\n sprintf('Stage %s not found for team %s for %s', $uuid, $team->getUuid(), $propertyLabel)\n );\n }\n\n $stageIds[] = $stage->getId();\n }\n\n return $stageIds;\n }\n\n private function validateAndGetUserIds(array $userUuids, callable $teamCheck): array\n {\n if (empty($userUuids)) {\n return [];\n }\n\n $userIds = [];\n\n foreach ($userUuids as $uuid) {\n $user = $this->userRepository->findByUuid($uuid);\n\n if (! $user || ! $user->isStatusActive()) {\n throw new InvalidArgumentException(\n sprintf('User %s not found or is not active', $uuid)\n );\n }\n\n if (! $teamCheck($user)) {\n throw new InvalidArgumentException(\n sprintf('User %s does not belong to the allowed team(s)', $uuid)\n );\n }\n\n $userIds[] = $user->getId();\n }\n\n return $userIds;\n }\n\n private function validateAndGetUserIdsByTeam(Team $team, array $userUuids): array\n {\n return $this->validateAndGetUserIds($userUuids, fn ($user) => $user->getTeamId() === $team->getId());\n }\n\n private function validateAndGetJiminnyUserIds(array $userUuids): array\n {\n $allowedTeamIds = config('kiosk.teamIds', []);\n\n return $this->validateAndGetUserIds($userUuids, fn ($user) => in_array($user->getTeamId(), $allowedTeamIds, true));\n }\n\n private function parseDate(string $dateString): string\n {\n return date('Y-m-d H:i:s', strtotime($dateString));\n }\n\n private function generateReportResultViewUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.view', ['uuid' => $result->getUuid()]);\n }\n\n private function generateReportResultDownloadUrl(AutomatedReportResult $result): string\n {\n $mediaResource = $this->getReportMediaRouteResource($result);\n\n return route('ai-reports.' . $mediaResource . '.download', ['uuid' => $result->getUuid()]);\n }\n\n private function getReportMediaRouteResource(AutomatedReportResult $result): string\n {\n if ($result->getMediaType() === self::MEDIA_TYPE_PDF) {\n return self::PDF_KEY;\n } elseif ($result->getMediaType() === self::MEDIA_TYPE_PODCAST) {\n return self::AUDIO_KEY;\n }\n\n throw new \\InvalidArgumentException('Unknown media type.');\n }\n\n public function getMediaPath(AutomatedReportResult $result): ?string\n {\n $url = match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => $result->getPdfUrl(),\n self::MEDIA_TYPE_PODCAST => $result->getPodcastAudioUrl(),\n default => null,\n };\n\n if ($url === null) {\n return null;\n }\n\n $path = parse_url(trim($url, '\"\\''), PHP_URL_PATH);\n\n return $path ?: null;\n }\n\n public function getFilenameSuffix(AutomatedReportResult $result): ?string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => 'Podcast',\n default => null,\n };\n }\n\n public function getMailSubjectSuffix(AutomatedReportResult $result): string\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PDF => 'report',\n self::MEDIA_TYPE_PODCAST => 'podcast',\n default => '',\n };\n }\n\n public function getMediaTypeMetadata(AutomatedReportResult $result): array\n {\n return match ($result->getMediaType()) {\n self::MEDIA_TYPE_PODCAST => ['extension' => 'mp3', 'mime' => 'audio/mpeg'],\n self::MEDIA_TYPE_PDF => ['extension' => 'pdf', 'mime' => 'application/pdf'],\n default => ['extension' => null, 'mime' => null],\n };\n }\n\n public function deleteS3Files(AutomatedReportResult $result): void\n {\n $teamUuid = $result->getReport()->getTeam()->getUuid();\n $reportUuid = $result->getUuid();\n\n // delete all files for a report uuid no mather of pdf, podcast, or both\n // in case of both - the podcast files are linked to the pdf (parent) uuid\n // pdf and podcast date times should be close\n $path = sprintf('%s/%s/%s', $teamUuid, self::S3_DIR, $reportUuid);\n\n foreach (self::FILE_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted S3 file', [\n 'path' => $file,\n ]);\n }\n }\n\n foreach (self::FILE_PODCAST_EXTENSIONS_VARIANTS as $extension) {\n $file = $path . '_podcast.' . $extension;\n\n if (Storage::exists($file)) {\n Storage::delete($file);\n Log::info('[Reports] Deleted Podcast S3 file', [\n 'path' => $file,\n ]);\n }\n }\n }\n\n /**\n *\n * @param int|null $teamId Optional team ID to filter results\n *\n * @return Collection<int, int> Collection of team IDs\n */\n public function getTeamIdsWithReportsResults(?int $teamId = null): Collection\n {\n return $this->automatedReportsRepository->getTeamIdsWithReportsResults($teamId);\n }\n\n /**\n * Core delete logic for report results using a query\n *\n * @param Builder $query\n * @param array $logContext\n *\n * @return int\n */\n private function deleteReportResultsByQuery(Builder $query, array $logContext = []): int\n {\n $deletedCount = 0;\n\n if ($query->exists()) {\n Log::info(\n 'Run delete report results',\n array_merge(\n $logContext,\n [\n 'service' => 'AutomatedReportsService',\n ]\n )\n );\n\n $query->chunkById(50, function ($results) use (&$deletedCount, $logContext) {\n foreach ($results as $result) {\n $this->deleteReportResult($result);\n $deletedCount++;\n\n Log::info(\n 'Deleted a report result',\n array_merge(\n $logContext,\n [\n 'result_id' => $result->getId(),\n 'report_id' => $result->getReportId(),\n ]\n )\n );\n }\n });\n }\n\n return $deletedCount;\n }\n\n /**\n * Delete report results for a team by retention period\n *\n * @param Team $team\n * @param CarbonImmutable $retentionDate\n *\n * @return int Number of deleted report results\n */\n public function deleteReportsResultsInRetentionPeriod(Team $team, CarbonImmutable $retentionDate): int\n {\n $reportIds = $this->automatedReportsRepository->getReportIdsByTeam($team);\n\n if ($reportIds->isEmpty()) {\n return 0;\n }\n\n $query = $this->automatedReportsRepository\n ->getReportResultsQueryForRetention($team, $retentionDate);\n\n return $this->deleteReportResultsByQuery($query, [\n 'team_id' => $team->getId(),\n 'retention_date' => $retentionDate->toDateTimeString(),\n ]);\n }\n\n /**\n * Delete ALL report results for a specific automated report\n *\n * @param string $uuid\n *\n * @return int\n */\n public function deleteReportResults(string $uuid): int\n {\n $report = $this->getReport($uuid);\n\n $query = $this->automatedReportsRepository->getResultsByReportQuery($report);\n\n return $this->deleteReportResultsByQuery($query, [\n 'report_uuid' => $uuid,\n 'report_id' => $report->getId(),\n ]);\n }\n\n public function deleteReportResult(AutomatedReportResult $result): void\n {\n $this->deleteS3Files($result);\n\n $result->delete();\n }\n\n /**\n * Get all reports for a specific team\n *\n * @param Team $team\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getTeamReports(Team $team): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getReportsByTeam($team);\n }\n\n /**\n * Get all report results for a specific report\n *\n * @param AutomatedReport $report\n *\n * @return \\Illuminate\\Database\\Eloquent\\Collection\n */\n public function getReportResults(AutomatedReport $report): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return $this->automatedReportsRepository->getResultsByReport($report);\n }\n\n public function deleteAllReportResults(AutomatedReport $report): void\n {\n $results = $this->getReportResults($report);\n\n /** @var AutomatedReportResult $result */\n foreach ($results as $result) {\n Log::info('Deleting result', [\n 'report' => $report->getId(),\n 'result' => $result->getId(),\n ]);\n\n $this->deleteReportResult($result);\n }\n }\n\n public function deleteAllData(Team $team): void\n {\n Log::info('Deleting automated report and results for team', [\n 'team' => $team->getId(),\n ]);\n\n $reports = $this->getTeamReports($team);\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n Log::info('Deleting report', [\n 'team' => $team->getId(),\n 'report' => $report->getId(),\n ]);\n\n $this->deleteAllReportResults($report);\n\n $report->delete();\n }\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
3397592283435315795
|
6686367547760219213
|
idle
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] this will add filter, however if we need to control feature by FF we need conditional logic
public const array TYPES = [
['id' => 'exec_summary', 'name' => 'Exec Summary'],
['id' => 'coaching_profiles', 'name' => 'Coaching Profiles'],
['id' => 'product_feedback', 'name' => 'Product Feedback'],
['id' => self::TYPE_LOSS_ANALYSIS, 'name' => 'Loss Analysis'],
// ['id' => 'questions', 'name' => 'Questions'],
// ['id' => 'statistical_quant', 'name' => 'Statistical Quantitative'],
];
public const array ALL_TYPES = [
...self::TYPES,
['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'],
];
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';
/**
* Frequencies for standard (non-Ask Jiminny) reports.
*/
public const array FREQUENCIES = [
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
/**
* Frequencies for Ask Jiminny reports.
*/
public const array ASK_JIMINNY_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
];
public const string MEDIA_TYPE_PDF = 'pdf';
public const string MEDIA_TYPE_PODCAST = 'podcast';
public const array MEDIA_TYPES = [self::MEDIA_TYPE_PDF, self::MEDIA_TYPE_PODCAST];
public const array MEDIA_TYPE_OBJECT_PDF = ['id' => self::MEDIA_TYPE_PDF, 'name' => 'PDF'];
public const array MEDIA_TYPE_OBJECT_PODCAST = ['id' => self::MEDIA_TYPE_PODCAST, 'name' => 'Podcast'];
public const array MEDIA_TYPE_OBJECTS = [self::MEDIA_TYPE_OBJECT_PDF, self::MEDIA_TYPE_OBJECT_PODCAST];
public const array CALL_TYPE_CONFERENCE = ['id' => 'conference', 'name' => 'Conference'];
public const array CALL_TYPE_DIALER = ['id' => 'dialer', 'name' => 'Dialer'];
public const int SENT_REPORT_AT_HOURS = 5;
public const string PDF_KEY = 'pdf';
public const string AUDIO_KEY = 'audio';
private const array ALL_FREQUENCIES = [
['id' => self::FREQUENCY_DAILY, 'name' => 'Daily'],
['id' => self::FREQUENCY_WEEKLY, 'name' => 'Weekly'],
['id' => self::FREQUENCY_MONTHLY, 'name' => 'Monthly'],
['id' => self::FREQUENCY_QUARTERLY, 'name' => 'Quarterly'],
['id' => self::FREQUENCY_ONE_OFF, 'name' => 'One-off'],
];
private const string S3_DIR = 'reports';
private const array FILE_EXTENSIONS_VARIANTS = ['html', 'MD', 'pdf'];
private const array FILE_PODCAST_EXTENSIONS_VARIANTS = ['json', 'mp3', 'ssml'];
public function __construct(
private readonly TeamRepository $teamRepository,
private readonly GroupRepository $groupRepository,
private readonly UserRepository $userRepository,
private readonly StageRepository $stageRepository,
private readonly DealStagesService $dealStagesService,
private readonly RecipientsService $recipientsService,
private readonly AutomatedReportsRepository $automatedReportsRepository,
private readonly Webhook $webhookService,
private readonly BusDispatcher $dispatcher,
private readonly ActivityTypeService $activityTypeService,
private readonly PlaybookCategoryRepository $playbookCategoryRepository,
private readonly AskAnythingPromptService $askAnythingPromptService,
private readonly SearchRepository $activitySearchRepository,
private readonly AskAnythingRepository $askAnythingRepository,
) {
}
public static function getTypes(): array
{
$types = self::TYPES;
return array_map(static function ($type) {
return $type['id'];
}, $types);
}
public static function getCallTypes(): array
{
return array_map(static function ($callType) {
return $callType['id'];
}, [self::CALL_TYPE_CONFERENCE, self::CALL_TYPE_DIALER]);
}
public static function getFrequencies(): array
{
return array_map(static function ($frequency) {
return $frequency['id'];
}, self::FREQUENCIES);
}
// front-facing structure
public function getReportEnabledFieldData(bool $value = false): array
{
return [
'id' => 'report_enabled',
'label' => '',
'inputType' => InputTypeEnum::TOGGLE,
'value' => $value,
];
}
// Organizations = Teams
public function getOrganizationFieldData(?string $value = null, bool $shortVersion = false): array
{
$options = $this->getTeams();
if ($shortVersion) {
return [
'id' => 'organization',
'label' => 'Organization',
'options' => $options,
];
}
return [
'id' => 'organization',
'label' => 'Organization',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $options,
'value' => $value,
'dependencies' => [
'teams',
'deal_stage_at_call',
'current_deal_stage',
'recipients',
ActivityTypeService::PLAYBOOK_CATEGORIES_KEY,
],
'dependsOn' => [],
];
}
// Teams = Groups
public function getTeamFieldData(array $options = [], array $value = [], bool $shortVersion = false): array
{
if ($shortVersion) {
return [
'id' => 'teams',
'label' => 'Team',
'options' => $options,
];
}
return [
'id' => 'teams',
'label' => 'Team',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => false,
'placeholder' => 'Select',
'options' => $options,
'value' => $value, // value should be an array of objects {id, name}
'dependencies' => [ActivityTypeService::PLAYBOOK_CATEGORIES_KEY],
'dependsOn' => [],
];
}
public function getReportTypeFieldData(?string $value = null, bool $shortVersion = false, ?Team $team = null): array
{
$types = [];
if ($team instanceof Team) {
if ($team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
$types = self::TYPES;
}
if ($team->hasFeature(FeatureEnum::ASK_JIMINNY_REPORTS)) {
$types[] = ['id' => self::TYPE_ASK_JIMINNY, 'name' => 'Ask Jiminny'];
}
} else {
$types = self::TYPES;
}
if ($shortVersion) {
return [
'id' => 'report_type',
'label' => 'Report Type',
'options' => $types,
];
}
return [
'id' => 'report_type',
'label' => 'Report Type',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => $types,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getFrequencyFieldData(?string $value = null): array
{
return [
'id' => 'frequency',
'label' => 'Frequency',
'inputType' => InputTypeEnum::DROPDOWN,
'required' => true,
'placeholder' => 'Select',
'options' => self::FREQUENCIES,
'value' => $value,
'dependencies' => ['period'],
'dependsOn' => [],
];
}
public function getPeriodFieldData(?string $valueStartDate = null, ?string $valueEndDate = null): array
{
return [
'id' => 'period',
'label' => 'Select one-off period',
'inputType' => InputTypeEnum::DATE_RANGE,
'required' => true,
'placeholder' => 'Select',
'value' => ['startDate' => $valueStartDate, 'endDate' => $valueEndDate],
'queryParams' => [
'startDate' => 'start_date_period',
'endDate' => 'end_date_period',
],
'dependencies' => [],
'dependsOn' => ['frequency'],
];
}
public function getActivityTypesFieldData(?Team $team = null, array $value = [], array $teamsFilter = []): array
{
return $this->activityTypeService->getActivityTypeFieldData(team: $team, value: $value, groupIds: $teamsFilter);
}
public function getDealStageAtCallFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getDealStageAtCallFieldData(team: $team, value: $value);
}
public function getCurrentDealStageFieldData(?Team $team = null, array $value = []): array
{
return $this->dealStagesService->getCurrentDealStageFieldData(team: $team, value: $value);
}
public function getDealValueFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'deal_value',
'label' => 'Deal Value',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_deal_value',
'max' => 'max_deal_value',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallTypeFieldData(bool $conferenceOn = false, bool $dialerOn = false): array
{
$value = [];
$conferenceOn && $value[] = self::CALL_TYPE_CONFERENCE;
$dialerOn && $value[] = self::CALL_TYPE_DIALER;
return [
'id' => 'call_type',
'label' => 'Call Type',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => [
self::CALL_TYPE_CONFERENCE,
self::CALL_TYPE_DIALER,
],
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getMediaTypeFieldData(?AutomatedReport $report = null): array
{
$value = [];
if ($report) {
$value = $this->transformMediaTypes($report);
}
return [
'id' => 'media_types',
'label' => 'Export as',
'inputType' => InputTypeEnum::DROPDOWN_MULTIPLE,
'required' => true,
'options' => self::MEDIA_TYPE_OBJECTS,
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCallDurationFieldData(?int $valueMin = null, ?int $valueMax = null): array
{
return [
'id' => 'call_duration',
'label' => 'Call Duration',
'inputType' => InputTypeEnum::INTEGER_RANGE,
'required' => false,
'value' => ['min' => $valueMin, 'max' => $valueMax],
'queryParams' => [
'min' => 'min_call_duration',
'max' => 'max_call_duration',
],
'dependencies' => [],
'dependsOn' => [],
];
}
public function getRecipientsFieldData(?Team $team = null, array $value = []): array
{
return $this->recipientsService->getRecipientsFieldData(team: $team, value: $value);
}
public function getJiminnyRecipientsFieldData(array $value = []): array
{
return $this->recipientsService->getJiminnyRecipientsFieldData($value);
}
public function getAdditionalPromptInputFieldData(?string $value = null): array
{
return [
'id' => 'additional_prompt_input',
'label' => 'Special requirements',
'inputType' => InputTypeEnum::TEXTAREA,
'required' => false,
'placeholder' => 'What should be the focus of the report?',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
public function getCustomReportNameFieldData(?string $value = null): array
{
return [
'id' => 'custom_name',
'label' => 'Custom report name',
'inputType' => InputTypeEnum::TEXT,
'required' => false,
'placeholder' => 'Enter custom name',
'value' => $value,
'dependencies' => [],
'dependsOn' => [],
];
}
// data providers
public function getTeams(): array
{
$teams = $this->teamRepository->getTeamsForKiosk(status: Team::STATUS_ACTIVE);
$teamData = [];
foreach ($teams as $team) {
if (! $team->hasFeature(FeatureEnum::AUTOMATED_REPORTS)) {
continue;
}
$teamData[] = $this->transformTeam($team);
}
return $teamData;
}
public function getTeamGroups(string $teamUuid): array
{
$data = [];
$team = $this->getTeam($teamUuid);
if ($team !== null) {
$groups = $team->groups()->get();
foreach ($groups as $group) {
$data[] = [
'id' => $group->getUuid(),
'name' => $group->getName(),
];
}
}
return $data;
}
public function getTeamsGroupsOptions(array $filterTeamUuids = []): array
{
$data = [];
$teams = $this->getTeams();
foreach ($teams as $team) {
if (! empty($filterTeamUuids) && ! in_array($team['id'], $filterTeamUuids, true)) {
continue;
}
$data[] = [
'label' => $team['name'],
'groups' => $this->getTeamGroups($team['id']),
];
}
return $data;
}
public function getTeam(string $teamUuid): ?Team
{
return $this->teamRepository->idOrUuid($teamUuid);
}
public function getTeamById(int $teamId): ?Team
{
return $this->teamRepository->find($teamId);
}
public function getGroupsUuids(AutomatedReport $report): array
{
$uuids = [];
$reportGroups = $report->getGroups();
foreach ($reportGroups as $groupId) {
if ($group = $this->groupRepository->find($groupId)) {
$uuids[] = $group->getUuid();
}
}
return $uuids;
}
public function getPlaybookCategoriesUuids(AutomatedReport $report): array
{
$uuids = [];
$playbookCategories = $report->getPlaybookCategories();
foreach ($playbookCategories as $id) {
if ($category = $this->playbookCategoryRepository->find($id)) {
$uuids[] = $category->getUuid();
}
}
return $uuids;
}
public function getDealAtCallStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getDealAtCallStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getCurrentDealStagesUuids(AutomatedReport $report): array
{
$uuids = [];
$reportStages = $report->getCurrentDealStages();
foreach ($reportStages as $id) {
if ($stage = $this->stageRepository->find($id)) {
$uuids[] = $stage->getUuid();
}
}
return $uuids;
}
public function getUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getRecipients());
}
public function getJiminnyUsersUuids(AutomatedReport $report): array
{
return $this->extractUserUuids($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function extractUserUuids(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => $user->getUuid())
->values()
->all();
}
// get mail data
public function getRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getRecipients());
}
private function getJiminnyRecipientUsers(AutomatedReport $report): array
{
return $this->buildRecipientUsers($report->getJiminnyRecipients());
}
/**
* @param array<string, mixed> $recipients
*/
private function buildRecipientUsers(array $recipients): array
{
$userIds = $recipients['users'] ?? [];
return collect($userIds)
->map(fn ($id) => $this->userRepository->find((int) $id))
->filter()
->map(fn (UserContract $user) => [
'email' => $user->getEmailAddress(),
'name' => $user->getName(),
'timezone' => $user->getTimezone()->getName(),
])
->values()
->all();
}
public function getValidRecipientUsers(AutomatedReport $report, bool $includeJiminny = false): array
{
if ($report->isAskJiminnyReport()) {
$recipients = $this->resolveAskJiminnyRecipients($report);
} else {
$recipients = $this->getRecipientUsers($report);
if ($includeJiminny) {
$recipients = array_merge($recipients, $this->getJiminnyRecipientUsers($report));
}
}
$emails = [];
return array_values(array_filter(
$recipients,
static function ($recipient) use (&$emails) {
if (empty($recipient['email']) || in_array($recipient['email'], $emails, true)) {
return false;
}
$emails[] = $recipient['email'];
return true;
}
));
}
private function resolveAskJiminnyRecipients(AutomatedReport $report): array
{
$recipients = [];
$creator = $report->getCreator();
if ($creator !== null) {
$recipients[] = [
'email' => $creator->getEmailAddress(),
'name' => $creator->getName(),
'timezone' => $creator->getTimezone()->getName(),
];
}
return array_merge(
$recipients,
$this->buildRecipientUsers($report->getRecipients()),
$this->getGroupRecipientUsers($report),
);
}
private function getGroupRecipientUsers(AutomatedReport $report): array
{
$users = [];
foreach ($report->getGroups() as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group === null) {
continue;
}
foreach ($group->getMembers() as $member) {
$users[] = [
'email' => $member->getEmailAddress(),
'name' => $member->getName(),
'timezone' => $member->getTimezone()->getName(),
];
}
}
return $users;
}
public function getReportTypeName(AutomatedReportResult $report): string
{
$type = $report->getReport()->getType();
$getType = $this->transformReportType($type);
return $getType['name'];
}
public function getReportPeriodName(AutomatedReportResult $report): string
{
$from = $report->getFromDate();
$to = $report->getToDate();
$frequency = $report->getReport()->getFrequency();
if ($from === null || $to === null) {
if (! $report->getReport()->isAskJiminnyReport()) {
$invalidPeriod = $from === null ? 'from' : 'to';
throw new ApplicationException('Report period is invalid: ' . $invalidPeriod);
}
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
}
return $this->formatReportPeriodName($frequency, $from, $to);
}
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 getReportTeamsName(AutomatedReportResult $report): string
{
$groups = $report->getGroups();
if (empty($groups)) {
return 'All';
}
// Get group names from repository
$groupNames = [];
foreach ($groups as $groupId) {
$group = $this->groupRepository->find($groupId);
if ($group) {
$groupNames[] = $group->getName();
}
}
if (count($groupNames) === 1) {
// Single team format
$teamsName = $groupNames[0];
} else {
// Multiple teams format
$teamsName = implode(', ', $groupNames);
}
return $teamsName;
}
public function getReportFileName(AutomatedReportResult $report): string
...
|
12312
|
|
12343
|
264
|
0
|
2026-04-14T11:14:47.363905+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165287363_m1.jpg...
|
Slack
|
Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Sl Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Slack...
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Vasil Vasilev
Apr 8th at 7:33:52 PM
7:33 PM
Лукас, привет
Apr 8th at 7:33:54 PM...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.4861111,"top":0.08777778,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.4861111,"top":0.14555556,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"bounds":{"left":0.4861111,"top":0.20333333,"width":0.022222223,"height":0.035555556},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.525,"top":0.07777778,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5326389,"top":0.13,"width":0.020833334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.525,"top":0.15333334,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"bounds":{"left":0.5347222,"top":0.20555556,"width":0.016666668,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"bounds":{"left":0.525,"top":0.22888888,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"bounds":{"left":0.52916664,"top":0.28111112,"width":0.027083334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"bounds":{"left":0.525,"top":0.30444443,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.5347222,"top":0.35666665,"width":0.015972223,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"bounds":{"left":0.525,"top":0.38,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"bounds":{"left":0.53402776,"top":0.43222222,"width":0.018055556,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"bounds":{"left":0.525,"top":0.45555556,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"bounds":{"left":0.53333336,"top":0.50777775,"width":0.01875,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.06111111,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.050694443,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.093055554,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.046527777,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.025694445,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.072222225,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.057638887,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.054166667,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.034027778,"height":0.007777778},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.60625,"top":0.14666666,"width":0.061805554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"bounds":{"left":0.60625,"top":0.17777778,"width":0.048611112,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"bounds":{"left":0.60625,"top":0.20888889,"width":0.072916664,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"bounds":{"left":0.60625,"top":0.24,"width":0.08055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"bounds":{"left":0.60625,"top":0.2711111,"width":0.035416666,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"bounds":{"left":0.60625,"top":0.30222222,"width":0.036805555,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"bounds":{"left":0.60625,"top":0.33333334,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"bounds":{"left":0.60625,"top":0.36444443,"width":0.036111113,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"bounds":{"left":0.60625,"top":0.39555556,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"bounds":{"left":0.60625,"top":0.42666668,"width":0.094444446,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"bounds":{"left":0.60625,"top":0.5,"width":0.055555556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"bounds":{"left":0.60625,"top":0.5311111,"width":0.07847222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.68472224,"top":0.5311111,"width":0.013194445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68958336,"top":0.5311111,"width":0.029861111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"bounds":{"left":0.60625,"top":0.56222224,"width":0.07986111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.5933333,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.67777777,"top":0.5933333,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"bounds":{"left":0.68333334,"top":0.5933333,"width":0.015972223,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.6244444,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.65555555,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.60625,"top":0.68666667,"width":0.07152778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7177778,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7177778,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.68472224,"top":0.7177778,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7488889,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7488889,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68472224,"top":0.7488889,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.60625,"top":0.78,"width":0.06875,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"bounds":{"left":0.60625,"top":0.85333335,"width":0.045833334,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"bounds":{"left":0.60625,"top":0.8844444,"width":0.024305556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"bounds":{"left":0.60625,"top":0.91555554,"width":0.06388889,"height":0.02},"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.73125,"top":0.12777779,"width":0.06458333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.75069445,"top":0.14,"width":0.039583333,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.79791665,"top":0.12777779,"width":0.07152778,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.8173611,"top":0.14,"width":0.046527777,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":17,"bounds":{"left":0.8715278,"top":0.12777779,"width":0.04375,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":19,"bounds":{"left":0.8909722,"top":0.14,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Pins","depth":17,"bounds":{"left":0.91805553,"top":0.12777779,"width":0.04236111,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Pins","depth":19,"bounds":{"left":0.9375,"top":0.14,"width":0.017361112,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.9625,"top":0.12777779,"width":0.022916667,"height":0.04222222},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.80138886,"top":0.17666666,"width":0.114583336,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.057638887,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:33:52 PM","depth":24,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:33 PM","depth":25,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Лукас, привет","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06736111,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:33:54 PM","depth":25,"bounds":{"left":0.7423611,"top":0.16111112,"width":0.016666668,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1654369245267095013
|
-4055220299034420471
|
idle
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Vasil Vasilev
Apr 8th at 7:33:52 PM
7:33 PM
Лукас, привет
Apr 8th at 7:33:54 PM
SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08]staging.INFO: [automated-reports] Checking conditions {"isMondaid":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a[2026-04-14 10:46:08]ab83a0f5432"}staging.INFO: [automated-reports] Processing daily reports{"c[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca®"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-_fiminny"') ("correlation-id : 5c2se861-2ca9-4h32-9f62-1736be80ca *[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-1410:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reports{"caa52627fc27"}[automated-reports] Automated report[2026-04-1410:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed {"correlation_id":root@c78a087b1345:/home/jiminny#|+HomeDMsActivityFilesLater.*•MorelhlJiminny ...+tscnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesE. Vasil VasilevAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...0. Adelina Petrova. Galya Dimitrova *&s Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...§ Support Daily • in 46 m100% <7Tue 14 Apr 14:14:56→Search Jiminny IncVasil VasilevMessagesAdd canvasC Files< Pins+Vasil Va*Wednesday, April 8th~благодариThursday, April 9th~Vasil Vasilev 12:08 PMЛукаш, приветhttps://github.com/jiminny/app/pull/11928трябва ми един approve, моляправя fine tuning на настойките засинхронизация на мейлиLukas Kovalik 12:11 PMготовоVasil Vasilev 12:11 PMблагодаряToday ~NewVasil Vasilev 2:01 PMЛукаш приветможе ли да разглдаш този ПР като имашмалко време:https://github.com/jiminny/app/pull/11949повечето промени са семантични, не сафункционалниразделям по голям ПР на две частиMessage Vasil Vasilfy...
|
12331
|
|
12346
|
265
|
0
|
2026-04-14T11:14:47.421738+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165287421_m2.jpg...
|
Slack
|
Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Sl Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Slack...
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Vasil Vasilev
Apr 8th at 7:33:52 PM
7:33 PM
Лукас, привет
Apr 8th at 7:33:54 PM
7:33
тук ли си ?
Apr 8th at 7:34:06 PM
7:34
можеш ли да дадеш един approve тука
Apr 8th at 7:34:09 PM
7:34
че видях един тъп проблем
Lukas Kovalik
Apr 8th at 7:34:09 PM
7:34 PM
здрасти, да
Vasil Vasilev
Apr 8th at 7:34:10 PM
7:34 PM
https://github.com/jiminny/app/pull/11920
https://github.com/jiminny/app/pull/11920
Lukas Kovalik
Apr 8th at 7:34:31 PM
7:34 PM
готово
Vasil Vasilev
Apr 8th at 7:34:36 PM
7:34 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
Vasil Vasilev
Apr 9th at 12:08:16 PM
12:08 PM
Лукаш, привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:19 PM
12:08
https://github.com/jiminny/app/pull/11928
https://github.com/jiminny/app/pull/11928
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:25 PM
12:08
трябва ми един approve, моля
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:35 PM
12:08
правя fine tuning на настойките за синхронизация на мейли
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Apr 9th at 12:11:24 PM
12:11 PM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Vasil Vasilev
Apr 9th at 12:11:50 PM
12:11 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
New
Vasil Vasilev
Today at 2:01:40 PM
2:01 PM
Лукаш привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:49 PM
2:01
може ли да разглдаш този ПР като имаш малко време:
https://github.com/jiminny/app/pull/11949
https://github.com/jiminny/app/pull/11949
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:59 PM
2:01
повечето промени са семантични, не са функционални
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:02:06 PM
2:02
разделям по голям ПР на две части
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.05486107},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.090972185},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.048611164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5328125,"top":1.0,"width":0.01171875,"height":-0.08124995},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.0958333},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.020703126,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.034375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.028515626,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.05234375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.026171874,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.014453125,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.040625,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.032421876,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.03046875,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.02265625,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.019140625,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.034765624,"height":-0.0916667},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.64453125,"top":1.0,"width":0.036328126,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.65546876,"top":1.0,"width":0.022265624,"height":-0.087499976},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.6820313,"top":1.0,"width":0.040234376,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.6929687,"top":1.0,"width":0.026171874,"height":-0.087499976},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":17,"bounds":{"left":0.7234375,"top":1.0,"width":0.024609376,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":19,"bounds":{"left":0.734375,"top":1.0,"width":0.010546875,"height":-0.087499976},"role_description":"text"},{"role":"AXRadioButton","text":"Pins","depth":17,"bounds":{"left":0.74960935,"top":1.0,"width":0.023828125,"height":-0.079861164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Pins","depth":19,"bounds":{"left":0.76054686,"top":1.0,"width":0.009765625,"height":-0.087499976},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.7746094,"top":1.0,"width":0.012890625,"height":-0.079861164},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:33:52 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:33 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Лукас, привет","depth":25,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:33:54 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:33","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"тук ли си ?","depth":25,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:06 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"можеш ли да дадеш един approve тука","depth":25,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:09 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"че видях един тъп проблем","depth":25,"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:09 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"здрасти, да","depth":25,"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:10 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11920","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11920","depth":26,"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:31 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:36 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"благодаря","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:08:16 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Лукаш, привет","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 9th at 12:08:19 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11928","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11928","depth":26,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 9th at 12:08:25 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"трябва ми един approve, моля","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 9th at 12:08:35 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"правя fine tuning на настойките за синхронизация на мейли","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:11:24 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:11 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:11:50 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:11 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"благодаря","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"New","depth":23,"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"role_description":"text"},{"role":"AXLink","text":"Today at 2:01:40 PM","depth":24,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01 PM","depth":25,"role_description":"text"},{"role":"AXStaticText","text":"Лукаш привет","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 2:01:49 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"може ли да разглдаш този ПР като имаш малко време:","depth":25,"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11949","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11949","depth":26,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 2:01:59 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"повечето промени са семантични, не са функционални","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 2:02:06 PM","depth":25,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:02","depth":26,"role_description":"text"},{"role":"AXStaticText","text":"разделям по голям ПР на две части","depth":25,"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8774134011045330816
|
-1280969691956328108
|
idle
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Vasil Vasilev
Apr 8th at 7:33:52 PM
7:33 PM
Лукас, привет
Apr 8th at 7:33:54 PM
7:33
тук ли си ?
Apr 8th at 7:34:06 PM
7:34
можеш ли да дадеш един approve тука
Apr 8th at 7:34:09 PM
7:34
че видях един тъп проблем
Lukas Kovalik
Apr 8th at 7:34:09 PM
7:34 PM
здрасти, да
Vasil Vasilev
Apr 8th at 7:34:10 PM
7:34 PM
https://github.com/jiminny/app/pull/11920
https://github.com/jiminny/app/pull/11920
Lukas Kovalik
Apr 8th at 7:34:31 PM
7:34 PM
готово
Vasil Vasilev
Apr 8th at 7:34:36 PM
7:34 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
Vasil Vasilev
Apr 9th at 12:08:16 PM
12:08 PM
Лукаш, привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:19 PM
12:08
https://github.com/jiminny/app/pull/11928
https://github.com/jiminny/app/pull/11928
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:25 PM
12:08
трябва ми един approve, моля
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:35 PM
12:08
правя fine tuning на настойките за синхронизация на мейли
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Apr 9th at 12:11:24 PM
12:11 PM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Vasil Vasilev
Apr 9th at 12:11:50 PM
12:11 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
New
Vasil Vasilev
Today at 2:01:40 PM
2:01 PM
Лукаш привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:49 PM
2:01
може ли да разглдаш този ПР като имаш малко време:
https://github.com/jiminny/app/pull/11949
https://github.com/jiminny/app/pull/11949
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:59 PM
2:01
повечето промени са семантични, не са функционални
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:02:06 PM
2:02
разделям по голям ПР на две части
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
PhpStormFV faVsco.js~ProjectvEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-jiminny ~© EmailMessageRepository.p© GenericAiPromptRepositor:© GroupRepository.phpInboxEmailBatchRepositoryInboxRepository.php© InvitationRepository.php© JobRepository.php© LanguageRepository.php© MomentRepository.phpNotificationRepository.php© ParticipantRepository.php© ParticipantSpeechReposito© ParticipantStatsRepository© PlaybookCategoryRepositc© PlaybookRepository.php© PlaylistActivityRepository.f© PlaylistRepository.phpPlaylistShareRepository.ph© QuestionRepository.phpC) RoleChangeEventReposito© RoleRepository.php© SearchRepository.php© SnapshotRepository.php© SocialAccountRepository.p© StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.p©TeamInsightsRepository.pt©TeamRepository.php©ThemeRepository.php© TimezoneRepository.php©TopicRepository.php© ToрicTriggerRepository.ph©TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph© TranscriptionSummaryRepr© UserRepository.php© VocabularyRepository.php> D Rulesv _ Services> D Activity> D AjReports> D Avatar0 CalendarC ConferenceD Crm› D Import> MInternalv MKioskv M AutomatedReports(C) ActivityTypeService.© AskJiminnyReportAc© AutomatedReportsCi© AutomatedReportsS:© DealStagesService.p© RecipientsService.ph© ReportController.phpJiminnybeouecommana.ong© AutomatedReportsCommand.php© AutomatedReportsRepository.phpC AutomatedReportsService.php XCreateHeldActivityEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php© AutomatedReportResult.php© AutomatedReport.phpclass Aucomareareporcsservicepublic function getReportTypeName(AutomatedReportResult $report): stringAutomatedReportsSendCommand.php• TrackProviderInstalledEvent.php© RequestGenerateAskJiminnyReportJob.php© AddLayoutEntities.php© Team.phpCreateActivityLoggedEvent.php© RequestGenerateReportJob.php6606656666676686706710/4673681683685687688689690692074074695696697698699#102 V3 V 34 /return SgetType['name'];26 usagespublic function getReportPeriodName(AutomatedReportResult $report): string$from = $report->getFromDate():$to = $report->getToDate():$frequency = $report->getReport() ->getFrequency():if ($from === null || $to === null) {if (! $report->getReport()->isAskJiminnyReport) {sInvaLLdPer1od = stron === null : "trom" : "to"throw new ApplicationException( message: 'Report period is invalid:' . $invalidPeriod);$period = $this->calculateFromAndToDatePeriod($frequency);$from = $period['fromDate'];$to = $period['toDate'];return $this->formatReportPeriodName($frequency, $from, $to);2 usagesprivate function formatReportPeriodName(strina Sfreauency. Carbon Sfrom. Carbon Sto): strina&tconxeanmnstrom-nformat( format: uhi$toYear = $to->format( format: "Y');$differentYears = $fromYear !== $toYear;switch ($frequency) {case self::FREQUENCY_DAILY:return $from->format( format: "j M Y');case selt.:-azUUaNLY UUAKEKLYAvan-var Zozs' or"Noy Zoz4eJan 200' 1 vears outtel$startMonth = $from->format( format:"M');$endMonth = $to->copy()->subMonthO);$endMonthName = $endMonth->format( format:"M');$endMonthYear = $endMonth->format( format:"Y');if ($differentYears) {return "{$startMonth} {$fromYear}- {$endMonthName} {$endMonthYear}";rerurn "ostartionuhr - encronunvaner otoyeara"ncase seut.ercuune MUNnLy// 'May 2025'moncnly reports are always wichin une same yeanreturn $from->format( format:) 'M Y');Support Daily - in 46 m= custom.log= laravel.logA SF ljiminny@localhost]4 HS_local [jiminny@localhost]Al console [PROD]A console [EU]A console [STAGING] X© AskJiminnyReportActivityService.php© ActivitySearch.phpOnbemanavzcontroller.onoC HistoryService.php© FilterDefinitionCollection.php© Criteria.php© AskJiminnyReportActivityServiceTest.phpRequestGenerateAskJiminnyReportJobTest.phpX:Auto vPlavaroundvMa lminnv v521-52252352452552652715281530531532533534535-536537538539540541542543=545₴546=5475481549550551554553554555556557558559560561-562563-564565566567=568E569JOIN users u on u.id = sa.sociable_idJOIN teams t 1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce' :016 A13 V.13 лselect * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, uvid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage.# crm_configuration_id, crm_provider_id,ranscriorion lor statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.id, p.activity_type,pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<-›1.n: on cl.id = pl. layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.freguency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expires.at IS NULL):select * from automated_report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;select * from automated_report_results where ceRont.ia IN (34, 35);698:474 spaces...
|
12312
|
|
12353
|
NULL
|
0
|
2026-04-14T11:15:13.200042+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165313200_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKE SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKER-₴81DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08]staging.INFO: [automated-reports] Checking conditions {"isMondaid":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a[2026-04-14 10:46:08]ab83a0f5432"}staging. INFO: [automated-reports] Processing daily reports{"c[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"'}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca®"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-fiminny"'} ("correlation-id' : 5c2se861-2ca -4792-9f87-773 e8oca[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reports{"caa52627fc27"}[automated-reports] Automated report[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$I+HomeDMsActivityFilesLater.*•MorelhlJiminny ...+tscnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesE. Vasil VasilevAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...0. Adelina Petrova. Galya Dimitrova *&s Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...§ Support Daily • in 45 m100% <7Tue 14 Apr 14:15:13→Search Jiminny IncVasil VasilevMessagesAdd canvasC Files< Pins+Vasil Va*Wednesday, April 8th~благодариThursday, April 9th~Vasil Vasilev 12:08 PMЛукаш, приветhttps://github.com/jiminny/app/pull/11928трябва ми един approve, моляправя fine tuning на настойките засинхронизация на мейлиLukas Kovalik 12:11 PMготовоVasil Vasilev 12:11 PMблагодаряToday ~NewVasil Vasilev 2:01 PMЛукаш приветможе ли да разглдаш този ПР като имашмалко време:https://github.com/jiminny/app/pull/11949повечето промени са семантични, не сафункционалниразделям по голям ПР на две частиздрAaShift + Return to add a new line...
|
NULL
|
-1903687493051113274
|
NULL
|
visual_change
|
ocr
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKE SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKER-₴81DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08]staging.INFO: [automated-reports] Checking conditions {"isMondaid":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a[2026-04-14 10:46:08]ab83a0f5432"}staging. INFO: [automated-reports] Processing daily reports{"c[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"'}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca®"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-fiminny"'} ("correlation-id' : 5c2se861-2ca -4792-9f87-773 e8oca[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reports{"caa52627fc27"}[automated-reports] Automated report[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$I+HomeDMsActivityFilesLater.*•MorelhlJiminny ...+tscnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesE. Vasil VasilevAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...0. Adelina Petrova. Galya Dimitrova *&s Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...§ Support Daily • in 45 m100% <7Tue 14 Apr 14:15:13→Search Jiminny IncVasil VasilevMessagesAdd canvasC Files< Pins+Vasil Va*Wednesday, April 8th~благодариThursday, April 9th~Vasil Vasilev 12:08 PMЛукаш, приветhttps://github.com/jiminny/app/pull/11928трябва ми един approve, моляправя fine tuning на настойките засинхронизация на мейлиLukas Kovalik 12:11 PMготовоVasil Vasilev 12:11 PMблагодаряToday ~NewVasil Vasilev 2:01 PMЛукаш приветможе ли да разглдаш този ПР като имашмалко време:https://github.com/jiminny/app/pull/11949повечето промени са семантични, не сафункционалниразделям по голям ПР на две частиздрAaShift + Return to add a new line...
|
12350
|
|
12354
|
NULL
|
0
|
2026-04-14T11:15:22.033534+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165322033_m2.jpg...
|
Slack
|
Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Sl Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Slack...
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.05486107},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.5066406,"top":1.0,"width":0.0125,"height":-0.090972185},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.048611164},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5328125,"top":1.0,"width":0.01171875,"height":-0.08124995},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.52851564,"top":1.0,"width":0.0203125,"height":-0.0958333},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.020703126,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.034375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5679687,"top":1.0,"width":0.028515626,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.05234375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.026171874,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.014453125,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.021484375,"height":-0.079861164},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.57421875,"top":1.0,"width":0.040625,"height":-0.079861164},"role_description":"text"}]...
|
-7379282153688250407
|
-1302641342697652629
|
visual_change
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
FirefoxFileEditViewHistory BookmarksProfiles Tools Window Help• github.com/jiminny/app/pull/11949jiminny / app 8Platform Sprint 1 Q2 - Platform Tea‹> Code8? Pull requests 28 ( Agents Actions DO Wiki Security and quality 24 Insights Lộs SettingsJY-20543 add AJ reports User pilo® On April 24 we'll start using GitHub Copilot interaction data for Al model training unless you opt out. Review this update and manage your preferences in your GitHub account settings.Z Configure SSH access to multipleConsole Home | Console Home | usSecurityGroup | EC2 |us-east-2JY-20543 add AJ reports User pilo5 SRD-6779 | JY-20632 | Unable toJy 19798 evaluation for ai activitya Jiminny8 Ask Jiminny test report - 8 Apr 20:Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc(x) Configure SSH access to multipleNew TabC CloudWatch I us-east-2Jy 20541 stale records pr 1 by *+ New TabA Vasil-Jiminny requested your review on this pull request.Jy 20541 stale records pr 1 #11949 °33 Open Vasil-Jiminny wants to merge 18 commits into master from JY-20542-stale-records-pr-1Conversation 11• Commits 18E Checks 3* Files changed 18Vasil-Jiminny commented 2 hours ago • edited -JIRA: JY-20541Description:This PR will be followed by #11879No significant functional changes.This PR introduces/updates a few shared contracts. There is a contact for Lead/Account/Contact/Opportunity (syncablecrm entities), and another for Lead/Account/Contact (prospect entities)It also semantically updates a few HTTP-family exceptions.Changes:• Introduce SyncableCrmObjectContract.• Update models to comply with new contract.• Added missing accessor methods to Activity, Opportunity and Participant models. Added safe guard checks forlogical issues, like missing crm_configuration_id, which should never happen, but the DB allows it.• Update HTTP exception definitions with type hints and struct types.‹ >0 lhl • j Support Daily • in 45 m(БГ)100% C2Tue 14 Apr 14:15:21Q Type to search+-Add your review• Awaiting approvalCode -+183 -33 00nПOI:2/95Ef Vasil-Jiminny added 6 commits 3 hours agoa € Define exceptions that may be thrown from sync "syncle object by id" - .a @ Add a common interface to wrap around all objects that may be synced - .a @ ALL HTTP-family exceptions are updated: all of them include strict ty... -a € Add shorthand accessor functions to activity model for accessing stag.. •a @ Introduce the SyncableCrmobjectInterface to the opportunity. Add miss.. ...a & Introduce accessor methods to Participant model. No functional changes.• @ Vasil-Jiminny requested review from LakyLak, TodorStamatovJiminny and yalokin-jiminny 2 hours ago< Vasil-Jiminny commented 2 hours agoOclaudeReviewers® LakyLakTodorStamatovJiminny@ yalokin-jiminnyO ilian-jiminnyAt least 1 approving review is required to mergethis pull request.Still in progress? Convert to draftAssigneesNo one-assign yourselfLabelsNone yetProjectsNone yetMilestoneNo milestoneDevelopment7fbac91Successfully merging this pull request may closethese issues.8c9dfcd Noneyet6a69718 NotificationsCustomize4202736068955CUnsubscribeYou're receiving notifications because you'rewatching this repository.X 94d51cc1 participant8 Lock conversation...
|
12352
|
|
12355
|
266
|
0
|
2026-04-14T11:15:44.414161+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165344414_m1.jpg...
|
Slack
|
Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Sl Vasil Vasilev (DM) - Jiminny Inc - 1 new item - Slack...
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Apr 8th at 7:34:06 PM
7:34
можеш ли да дадеш един approve тука
Apr 8th at 7:34:09 PM
7:34
че видях един тъп проблем
Lukas Kovalik
Apr 8th at 7:34:09 PM
7:34 PM
здрасти, да
Vasil Vasilev
Apr 8th at 7:34:10 PM
7:34 PM
https://github.com/jiminny/app/pull/11920
https://github.com/jiminny/app/pull/11920
Lukas Kovalik
Apr 8th at 7:34:31 PM
7:34 PM
готово
Vasil Vasilev
Apr 8th at 7:34:36 PM
7:34 PM
благодаря
Jump to date
Vasil Vasilev
Apr 9th at 12:08:16 PM
12:08 PM
Лукаш, привет
Apr 9th at 12:08:19 PM
12:08
https://github.com/jiminny/app/pull/11928
https://github.com/jiminny/app/pull/11928
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:25 PM
12:08
трябва ми един approve, моля
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:35 PM
12:08
правя fine tuning на настойките за синхронизация на мейли
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Apr 9th at 12:11:24 PM
12:11 PM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Vasil Vasilev
Apr 9th at 12:11:50 PM
12:11 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
New
Vasil Vasilev
Today at 2:01:40 PM
2:01 PM
Лукаш привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:49 PM
2:01
може ли да разглдаш този ПР като имаш малко време:
https://github.com/jiminny/app/pull/11949
https://github.com/jiminny/app/pull/11949
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:59 PM
2:01
повечето промени са семантични, не са функционални...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Jiminny Inc","depth":12,"bounds":{"left":0.4861111,"top":0.08777778,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXRadioButton","text":"Jiminny (Staging)","depth":12,"bounds":{"left":0.4861111,"top":0.14555556,"width":0.022222223,"height":0.035555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Add workspaces","depth":12,"bounds":{"left":0.4861111,"top":0.20333333,"width":0.022222223,"height":0.035555556},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"Home","depth":14,"bounds":{"left":0.525,"top":0.07777778,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Home","depth":16,"bounds":{"left":0.5326389,"top":0.13,"width":0.020833334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"DMs","depth":14,"bounds":{"left":0.525,"top":0.15333334,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"DMs","depth":16,"bounds":{"left":0.5347222,"top":0.20555556,"width":0.016666668,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Activity","depth":14,"bounds":{"left":0.525,"top":0.22888888,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Activity","depth":16,"bounds":{"left":0.52916664,"top":0.28111112,"width":0.027083334,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":14,"bounds":{"left":0.525,"top":0.30444443,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.5347222,"top":0.35666665,"width":0.015972223,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"Later","depth":14,"bounds":{"left":0.525,"top":0.38,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Later","depth":16,"bounds":{"left":0.53402776,"top":0.43222222,"width":0.018055556,"height":0.015555556},"role_description":"text"},{"role":"AXRadioButton","text":"More…","depth":14,"bounds":{"left":0.525,"top":0.45555556,"width":0.036111113,"height":0.075555556},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"More","depth":16,"bounds":{"left":0.53333336,"top":0.50777775,"width":0.01875,"height":0.015555556},"role_description":"text"},{"role":"AXStaticText","text":"Unreads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Threads","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Huddles","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Drafts & sent","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.06111111,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Directories","depth":21,"bounds":{"left":0.5951389,"top":0.12777779,"width":0.050694443,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"platform-inner-team","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.093055554,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"ai-chapter","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.046527777,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"alerts","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.025694445,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"backend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.038194444,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"confusion-clinic","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.072222225,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"curiosity_lab","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.057638887,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"engineering","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.054166667,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"frontend","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.04027778,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"general","depth":23,"bounds":{"left":0.60625,"top":0.12777779,"width":0.034027778,"height":0.007777778},"role_description":"text"},{"role":"AXStaticText","text":"infra-changes","depth":23,"bounds":{"left":0.60625,"top":0.14666666,"width":0.061805554,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"jiminny-bg","depth":23,"bounds":{"left":0.60625,"top":0.17777778,"width":0.048611112,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"platform-tickets","depth":23,"bounds":{"left":0.60625,"top":0.20888889,"width":0.072916664,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"product_launches","depth":23,"bounds":{"left":0.60625,"top":0.24,"width":0.08055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"random","depth":23,"bounds":{"left":0.60625,"top":0.2711111,"width":0.035416666,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"releases","depth":23,"bounds":{"left":0.60625,"top":0.30222222,"width":0.036805555,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"sofia-office","depth":23,"bounds":{"left":0.60625,"top":0.33333334,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"support","depth":23,"bounds":{"left":0.60625,"top":0.36444443,"width":0.036111113,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"thank-yous","depth":23,"bounds":{"left":0.60625,"top":0.39555556,"width":0.05138889,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"the_people_of_jiminny","depth":23,"bounds":{"left":0.60625,"top":0.42666668,"width":0.094444446,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Vasil Vasilev","depth":23,"bounds":{"left":0.60625,"top":0.5,"width":0.055555556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Aneliya Angelova","depth":23,"bounds":{"left":0.60625,"top":0.5311111,"width":0.07847222,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.68472224,"top":0.5311111,"width":0.013194445,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68958336,"top":0.5311111,"width":0.029861111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"bounds":{"left":0.60625,"top":0.56222224,"width":0.07986111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.5933333,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.67777777,"top":0.5933333,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Ilian Kyuchukov","depth":23,"bounds":{"left":0.68333334,"top":0.5933333,"width":0.015972223,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Steliyan Georgiev","depth":23,"role_description":"text"},{"role":"AXStaticText","text":"Adelina Petrova","depth":23,"bounds":{"left":0.60625,"top":0.6244444,"width":0.072222225,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.65555555,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.60625,"top":0.68666667,"width":0.07152778,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7177778,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7177778,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Nikolov","depth":23,"bounds":{"left":0.68472224,"top":0.7177778,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Galya Dimitrova","depth":23,"bounds":{"left":0.60625,"top":0.7488889,"width":0.07361111,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":",","depth":23,"bounds":{"left":0.6791667,"top":0.7488889,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.68472224,"top":0.7488889,"width":0.018055556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Nikolay Yankov","depth":23,"bounds":{"left":0.60625,"top":0.78,"width":0.06875,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Jira Cloud","depth":23,"bounds":{"left":0.60625,"top":0.85333335,"width":0.045833334,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Toast","depth":23,"bounds":{"left":0.60625,"top":0.8844444,"width":0.024305556,"height":0.02},"role_description":"text"},{"role":"AXStaticText","text":"Google Calendar","depth":23,"bounds":{"left":0.60625,"top":0.91555554,"width":0.06388889,"height":0.02},"role_description":"text"},{"role":"AXRadioButton","text":"Messages","depth":17,"bounds":{"left":0.73125,"top":0.12777779,"width":0.06458333,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true,"is_expanded":false},{"role":"AXStaticText","text":"Messages","depth":19,"bounds":{"left":0.75069445,"top":0.14,"width":0.039583333,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Add canvas","depth":18,"bounds":{"left":0.79791665,"top":0.12777779,"width":0.07152778,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Add canvas","depth":20,"bounds":{"left":0.8173611,"top":0.14,"width":0.046527777,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Files","depth":17,"bounds":{"left":0.8715278,"top":0.12777779,"width":0.04375,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Files","depth":19,"bounds":{"left":0.8909722,"top":0.14,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXRadioButton","text":"Pins","depth":17,"bounds":{"left":0.91805553,"top":0.12777779,"width":0.04236111,"height":0.04222222},"role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Pins","depth":19,"bounds":{"left":0.9375,"top":0.14,"width":0.017361112,"height":0.017777778},"role_description":"text"},{"role":"AXPopUpButton","text":"Add and Edit Channel Tabs","depth":17,"bounds":{"left":0.9625,"top":0.12777779,"width":0.022916667,"height":0.04222222},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Canvas","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"List","depth":17,"role_description":"text"},{"role":"AXStaticText","text":"Folder","depth":17,"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.80138886,"top":0.16111112,"width":0.114583336,"height":0.0011111111},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 8th at 7:34:06 PM","depth":25,"bounds":{"left":0.7423611,"top":0.16111112,"width":0.016666668,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34","depth":26,"bounds":{"left":0.7423611,"top":0.16111112,"width":0.016666668,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"можеш ли да дадеш един approve тука","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.18888889,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:09 PM","depth":25,"bounds":{"left":0.7423611,"top":0.16111112,"width":0.016666668,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34","depth":26,"bounds":{"left":0.7423611,"top":0.16111112,"width":0.016666668,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"че видях един тъп проблем","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.13333334,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:09 PM","depth":24,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.03125,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.03125,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"здрасти, да","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.055555556,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.057638887,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:10 PM","depth":24,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11920","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.19791667,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11920","depth":26,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.19791667,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.06458333,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:31 PM","depth":24,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.03125,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"bounds":{"left":0.8347222,"top":0.16111112,"width":0.03125,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.057638887,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 8th at 7:34:36 PM","depth":24,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"7:34 PM","depth":25,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.031944446,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"благодаря","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.05,"height":0.0011111111},"role_description":"text"},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.80625,"top":0.17666666,"width":0.10486111,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.057638887,"height":0.0011111111},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.16111112,"width":0.0055555557,"height":0.0011111111},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:08:16 PM","depth":24,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08 PM","depth":25,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.036805555,"height":0.0011111111},"role_description":"text"},{"role":"AXStaticText","text":"Лукаш, привет","depth":25,"bounds":{"left":0.76458335,"top":0.16111112,"width":0.07083333,"height":0.018888889},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:08:19 PM","depth":25,"bounds":{"left":0.7375,"top":0.19666667,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"bounds":{"left":0.7375,"top":0.19666667,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11928","depth":25,"bounds":{"left":0.76458335,"top":0.19333333,"width":0.19791667,"height":0.02},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11928","depth":26,"bounds":{"left":0.76458335,"top":0.19333333,"width":0.19791667,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.16111112,"width":0.022222223,"height":0.033333335},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.16111112,"width":0.022222223,"height":0.033333335},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.16111112,"width":0.022222223,"height":0.033333335},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.16111112,"width":0.022222223,"height":0.033333335},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.16111112,"width":0.022222223,"height":0.033333335},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 9th at 12:08:25 PM","depth":25,"bounds":{"left":0.7375,"top":0.23,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"bounds":{"left":0.7375,"top":0.23,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"трябва ми един approve, моля","depth":25,"bounds":{"left":0.76458335,"top":0.22666667,"width":0.14444445,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.19222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.19222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.19222222,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.19222222,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.19222222,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Apr 9th at 12:08:35 PM","depth":25,"bounds":{"left":0.7375,"top":0.26333332,"width":0.021527778,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:08","depth":26,"bounds":{"left":0.7375,"top":0.26333332,"width":0.021527778,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"правя fine tuning на настойките за синхронизация на мейли","depth":25,"bounds":{"left":0.76458335,"top":0.26,"width":0.16319445,"height":0.044444446},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.22555555,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.22555555,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.22555555,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.22555555,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.22555555,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Lukas Kovalik","depth":24,"bounds":{"left":0.76458335,"top":0.31555554,"width":0.06458333,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82916665,"top":0.31777778,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:11:24 PM","depth":24,"bounds":{"left":0.8347222,"top":0.3211111,"width":0.036111113,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:11 PM","depth":25,"bounds":{"left":0.8347222,"top":0.3211111,"width":0.036111113,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"готово","depth":25,"bounds":{"left":0.76458335,"top":0.3422222,"width":0.031944446,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.29666665,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.29666665,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.29666665,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.29666665,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.29666665,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.37333333,"width":0.057638887,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.37555555,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Apr 9th at 12:11:50 PM","depth":24,"bounds":{"left":0.82708335,"top":0.37888888,"width":0.036805555,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"12:11 PM","depth":25,"bounds":{"left":0.82708335,"top":0.37888888,"width":0.036805555,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"благодаря","depth":25,"bounds":{"left":0.76458335,"top":0.4,"width":0.05,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.35444444,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.35444444,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.35444444,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.35444444,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.35444444,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"Jump to date","depth":23,"bounds":{"left":0.83194447,"top":0.4422222,"width":0.05277778,"height":0.031111112},"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"New","depth":23,"bounds":{"left":0.96458334,"top":0.4488889,"width":0.01875,"height":0.017777778},"role_description":"text"},{"role":"AXButton","text":"Vasil Vasilev","depth":24,"bounds":{"left":0.76458335,"top":0.48555556,"width":0.057638887,"height":0.024444444},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"","depth":24,"bounds":{"left":0.82222223,"top":0.48777777,"width":0.0055555557,"height":0.02},"role_description":"text"},{"role":"AXLink","text":"Today at 2:01:40 PM","depth":24,"bounds":{"left":0.82708335,"top":0.4911111,"width":0.031944446,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01 PM","depth":25,"bounds":{"left":0.82708335,"top":0.4911111,"width":0.031944446,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"Лукаш привет","depth":25,"bounds":{"left":0.76458335,"top":0.51222223,"width":0.06875,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.46666667,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.46666667,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.46666667,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.46666667,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.46666667,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 2:01:49 PM","depth":25,"bounds":{"left":0.7423611,"top":0.54888886,"width":0.016666668,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01","depth":26,"bounds":{"left":0.7423611,"top":0.54888886,"width":0.016666668,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"може ли да разглдаш този ПР като имаш малко време:","depth":25,"bounds":{"left":0.76458335,"top":0.54555553,"width":0.19861111,"height":0.044444446},"role_description":"text"},{"role":"AXLink","text":"https://github.com/jiminny/app/pull/11949","depth":25,"bounds":{"left":0.76458335,"top":0.59444445,"width":0.19791667,"height":0.02},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"https://github.com/jiminny/app/pull/11949","depth":26,"bounds":{"left":0.76458335,"top":0.59444445,"width":0.19791667,"height":0.02},"role_description":"text"},{"role":"AXCheckBox","text":"React with white_check_mark","depth":26,"bounds":{"left":0.8048611,"top":0.51111114,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with eyes","depth":26,"bounds":{"left":0.82708335,"top":0.51111114,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"React with raised_hands","depth":26,"bounds":{"left":0.84930557,"top":0.51111114,"width":0.022222223,"height":0.035555556},"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Add reaction…","depth":26,"bounds":{"left":0.8715278,"top":0.51111114,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Reply in thread","depth":26,"bounds":{"left":0.89375,"top":0.51111114,"width":0.022222223,"height":0.035555556},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Forward message…","depth":26,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXCheckBox","text":"Save for later","depth":26,"role_description":"toggle button","subrole":"AXToggleButton","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXPopUpButton","text":"More actions","depth":26,"role_description":"pop-up button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Today at 2:01:59 PM","depth":25,"bounds":{"left":0.7423611,"top":0.6311111,"width":0.016666668,"height":0.016666668},"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2:01","depth":26,"bounds":{"left":0.7423611,"top":0.6311111,"width":0.016666668,"height":0.016666668},"role_description":"text"},{"role":"AXStaticText","text":"повечето промени са семантични, не са функционални","depth":25,"bounds":{"left":0.76458335,"top":0.62777776,"width":0.19166666,"height":0.044444446},"role_description":"text"}]...
|
-4771166984679079823
|
-1280828954467972796
|
idle
|
hybrid
|
NULL
|
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Jiminny Inc
Jiminny (Staging)
Add workspaces
Home
Home
DMs
DMs
Activity
Activity
Files
Files
Later
Later
More…
More
Unreads
Threads
Huddles
Drafts & sent
Directories
platform-inner-team
ai-chapter
alerts
backend
confusion-clinic
curiosity_lab
engineering
frontend
general
infra-changes
jiminny-bg
platform-tickets
product_launches
random
releases
sofia-office
support
thank-yous
the_people_of_jiminny
Vasil Vasilev
Aneliya Angelova
,
Nikolay Yankov
,
Steliyan Georgiev
Steliyan Georgiev
Adelina Petrova
,
Ilian Kyuchukov
,
Steliyan Georgiev
Adelina Petrova
Galya Dimitrova
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Nikolov
Galya Dimitrova
,
Nikolay Yankov
Nikolay Yankov
Jira Cloud
Toast
Google Calendar
Messages
Messages
Add canvas
Add canvas
Files
Files
Pins
Pins
Add and Edit Channel Tabs
Canvas
List
Folder
Jump to date
Apr 8th at 7:34:06 PM
7:34
можеш ли да дадеш един approve тука
Apr 8th at 7:34:09 PM
7:34
че видях един тъп проблем
Lukas Kovalik
Apr 8th at 7:34:09 PM
7:34 PM
здрасти, да
Vasil Vasilev
Apr 8th at 7:34:10 PM
7:34 PM
https://github.com/jiminny/app/pull/11920
https://github.com/jiminny/app/pull/11920
Lukas Kovalik
Apr 8th at 7:34:31 PM
7:34 PM
готово
Vasil Vasilev
Apr 8th at 7:34:36 PM
7:34 PM
благодаря
Jump to date
Vasil Vasilev
Apr 9th at 12:08:16 PM
12:08 PM
Лукаш, привет
Apr 9th at 12:08:19 PM
12:08
https://github.com/jiminny/app/pull/11928
https://github.com/jiminny/app/pull/11928
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:25 PM
12:08
трябва ми един approve, моля
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Apr 9th at 12:08:35 PM
12:08
правя fine tuning на настойките за синхронизация на мейли
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Lukas Kovalik
Apr 9th at 12:11:24 PM
12:11 PM
готово
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Vasil Vasilev
Apr 9th at 12:11:50 PM
12:11 PM
благодаря
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Jump to date
New
Vasil Vasilev
Today at 2:01:40 PM
2:01 PM
Лукаш привет
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:49 PM
2:01
може ли да разглдаш този ПР като имаш малко време:
https://github.com/jiminny/app/pull/11949
https://github.com/jiminny/app/pull/11949
React with white_check_mark
React with eyes
React with raised_hands
Add reaction…
Reply in thread
Forward message…
Save for later
More actions
Today at 2:01:59 PM
2:01
повечето промени са семантични, не са функционални
SlackFileEditViewGoHistoryWindowHelpec2-userGDOCKER981DEV (docker)882APP (-zsh)[EMAIL]@73b64f5d54a3:/home/jiminny#[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockny && bash"root@c78a087b1345:/home/Jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started{"correlation_id":"5[2026-04-1410:46:08]staging.INFO: [automated-reports] Checking conditions {"isMondaid":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a[2026-04-14 10:46:08]ab83a0f5432"}staging. INFO: [automated-reports] Processing daily reports{"c[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to proc[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report j,"type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca®"[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report jdaily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab"[2026-04-14 10:46:08]staging. INFO: [automated-reports]daily'", "type" "ask-fiminny"'} ("correlation-id' : 5c2se861-2ca -4792-9f87-773 e8oca[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"2[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMondaid":"246a1ala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa526[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reports{"caa52627fc27"}[automated-reports] Automated report[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily reports to proc9-b635-2aa52627f c27"}[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Reportdaily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$I+HomeDMsActivityFilesLater.*•MorelhlJiminny ...+tscnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesE. Vasil VasilevAneliya Angelova, ...Steliyan GeorgievAdelina Petrova, Ili...0. Adelina Petrova. Galya Dimitrova&s Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...§ Support Daily • in 45 m100% <7Tue 14 Apr 14:15:44→Search Jiminny IncVasil VasilevMessagesAdd canvasC Files< Pinsлукаш, приветThursday, April 9th~https://git...rorr/pull/11928+трябва ми един approve, моляправя fine tuning на настойките засинхронизация на мейлиLukas Kovalik 12:11 PMготовоVasil Vasilev 12:11 PMблагодаряToday ~NewVasil Vasilev 2:01 PMЛукаш приветможе ли да разглдаш този ПР като имашмалко време:https://github.com/jiminny/app/pull/11949повечето промени са семантични, не сафункционалниразделям по голям ПР на две частиLukas Kovalik 2:15 PMздрасти, да ще го погледна по-кьсноспешно ли еVasil Vasilev 2:15 PMмерсиMessage Vasil Vasilev...Vasil Vasilev is typing...
|
NULL
|
|
12357
|
267
|
0
|
2026-04-14T11:15:52.311055+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165352311_m2.jpg...
|
Firefox
|
Jy 20541 stale records pr 1 by Vasil-Jiminny · Pul Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app — Work...
|
1
|
github.com/jiminny/app/pull/11949
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Pipelines - jiminny/app
Feed — jiminny — Sentry
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app
Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
Issues(g then i)
Pull requests
Repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (28)
Pull requests
(
28
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (24)
Security and quality
(
24
)
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
Review requested
Review requested
Vasil-Jiminny
Vasil-Jiminny
requested your review on this pull request.
Add your review
Add your review
Jy 20541 stale records pr 1 #11949 Edit title
Jy 20541 stale records pr 1
#
11949
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
Vasil-Jiminny
Vasil-Jiminny
wants to merge 18 commits into
master
master
from
JY-20541-stale-records-pr-1
JY-20541-stale-records-pr-1
Copy head branch name to clipboard
Lines changed: 183 additions & 33 deletions...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.00234375,"top":0.045138888,"width":0.0296875,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Pipelines - jiminny/app","depth":4,"bounds":{"left":0.03203125,"top":0.045138888,"width":0.0296875,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Feed — jiminny — Sentry","depth":4,"bounds":{"left":0.06171875,"top":0.045138888,"width":0.0296875,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":4,"bounds":{"left":0.0,"top":0.08263889,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira","depth":5,"bounds":{"left":0.015625,"top":0.09236111,"width":0.11796875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.11111111,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.12083333,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.13958333,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.14930555,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Console Home | Console Home | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.16805555,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Console Home | Console Home | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.17777778,"width":0.08671875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SecurityGroup | EC2 | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.19652778,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SecurityGroup | EC2 | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.20625,"width":0.06484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.225,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.23472223,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.2534722,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.26319444,"width":0.23476562,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":4,"bounds":{"left":0.0,"top":0.28194445,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet","depth":5,"bounds":{"left":0.015625,"top":0.29166666,"width":0.1984375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","depth":4,"bounds":{"left":0.0,"top":0.31041667,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":5,"bounds":{"left":0.015625,"top":0.3201389,"width":0.015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":4,"bounds":{"left":0.0,"top":0.33888888,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf","depth":5,"bounds":{"left":0.015625,"top":0.34861112,"width":0.1640625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":4,"bounds":{"left":0.0,"top":0.3673611,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Service-Desk - Queues - Platform team - Service space - Jira","depth":5,"bounds":{"left":0.015625,"top":0.37708333,"width":0.12617187,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.39583334,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.40555555,"width":0.18710938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"bounds":{"left":0.0,"top":0.42430556,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.4340278,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"bounds":{"left":0.0,"top":0.45277777,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"New Tab","depth":5,"bounds":{"left":0.015625,"top":0.4625,"width":0.017578125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | us-east-2","depth":4,"bounds":{"left":0.0,"top":0.48125,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch | us-east-2","depth":5,"bounds":{"left":0.015625,"top":0.49097222,"width":0.0484375,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app","depth":4,"bounds":{"left":0.0,"top":0.50972223,"width":0.09375,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.51944447,"width":0.16210938,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.07890625,"top":0.5159722,"width":0.009375,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.003125,"top":0.5395833,"width":0.08710937,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"bounds":{"left":0.003125,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Google Gemini (⌃X)","depth":6,"bounds":{"left":0.01640625,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Tabs from other devices","depth":6,"bounds":{"left":0.029296875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open history (⇧⌘H)","depth":6,"bounds":{"left":0.0421875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open bookmarks (⌘B)","depth":6,"bounds":{"left":0.05546875,"top":0.97430557,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Skip to content","depth":6,"bounds":{"left":0.09375,"top":0.045138888,"width":0.000390625,"height":0.00069444446},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Skip to content","depth":7,"bounds":{"left":0.09375,"top":0.046527777,"width":0.003515625,"height":0.18680556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Open menu","depth":10,"bounds":{"left":0.1,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Homepage (g then d)","depth":9,"bounds":{"left":0.1171875,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"jiminny","depth":12,"bounds":{"left":0.1328125,"top":0.05625,"width":0.022265624,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"jiminny","depth":14,"bounds":{"left":0.13515624,"top":0.061805554,"width":0.017578125,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"app","depth":12,"bounds":{"left":0.1609375,"top":0.05625,"width":0.02109375,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"app","depth":14,"bounds":{"left":0.16328125,"top":0.061805554,"width":0.01015625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Search or jump to…","depth":9,"bounds":{"left":0.7792969,"top":0.05625,"width":0.07734375,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Type","depth":12,"bounds":{"left":0.79375,"top":0.061805554,"width":0.0140625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"/","depth":12,"bounds":{"left":0.809375,"top":0.0625,"width":0.002734375,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"to search","depth":12,"bounds":{"left":0.8140625,"top":0.061805554,"width":0.025,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Chat with Copilot","depth":10,"bounds":{"left":0.85898435,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXMenuButton","text":"Open Copilot…","depth":9,"bounds":{"left":0.87109375,"top":0.05625,"width":0.01015625,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXMenuButton","text":"Create new...","depth":9,"bounds":{"left":0.890625,"top":0.05625,"width":0.01953125,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXLink","text":"Issues(g then i)","depth":9,"bounds":{"left":0.91328126,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Pull requests","depth":9,"bounds":{"left":0.92890626,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Repositories","depth":9,"bounds":{"left":0.94453126,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"You have unread notifications(g then n)","depth":9,"bounds":{"left":0.96015626,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Open user navigation menu","depth":9,"bounds":{"left":0.97578126,"top":0.05625,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Repository navigation","depth":9,"bounds":{"left":0.09335937,"top":0.044444446,"width":0.000390625,"height":0.00069444446},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Repository navigation","depth":10,"bounds":{"left":0.09335937,"top":0.046527777,"width":0.09257813,"height":0.020833334},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Code","depth":12,"bounds":{"left":0.1,"top":0.08680555,"width":0.029296875,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Code","depth":14,"bounds":{"left":0.1125,"top":0.09236111,"width":0.013671875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Pull requests (28)","depth":12,"bounds":{"left":0.13242188,"top":0.08680555,"width":0.06484375,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Pull requests","depth":14,"bounds":{"left":0.14609376,"top":0.09236111,"width":0.032421876,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":14,"bounds":{"left":0.1828125,"top":0.099305555,"width":0.003515625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"28","depth":14,"bounds":{"left":0.18632813,"top":0.099305555,"width":0.006640625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":14,"bounds":{"left":0.19296876,"top":0.099305555,"width":0.001953125,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Agents","depth":12,"bounds":{"left":0.20039062,"top":0.08680555,"width":0.034375,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Agents","depth":14,"bounds":{"left":0.21328124,"top":0.09236111,"width":0.01796875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Actions","depth":12,"bounds":{"left":0.23789063,"top":0.08680555,"width":0.035546876,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Actions","depth":14,"bounds":{"left":0.25078124,"top":0.09236111,"width":0.01875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Wiki","depth":12,"bounds":{"left":0.2765625,"top":0.08680555,"width":0.026953125,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Wiki","depth":14,"bounds":{"left":0.28945312,"top":0.09236111,"width":0.010546875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Security and quality (24)","depth":12,"bounds":{"left":0.30664062,"top":0.08680555,"width":0.0828125,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Security and quality","depth":14,"bounds":{"left":0.3203125,"top":0.09236111,"width":0.05,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"(","depth":14,"bounds":{"left":0.375,"top":0.099305555,"width":0.003515625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"24","depth":14,"bounds":{"left":0.37851563,"top":0.099305555,"width":0.006640625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":")","depth":14,"bounds":{"left":0.38515624,"top":0.099305555,"width":0.001953125,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Insights","depth":12,"bounds":{"left":0.39257812,"top":0.08680555,"width":0.03671875,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Insights","depth":14,"bounds":{"left":0.40585938,"top":0.09236111,"width":0.01953125,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Settings","depth":12,"bounds":{"left":0.43242186,"top":0.08680555,"width":0.037890624,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Settings","depth":14,"bounds":{"left":0.44570312,"top":0.09236111,"width":0.020703126,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Important update","depth":10,"bounds":{"left":0.10976563,"top":0.125,"width":0.000390625,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Important update","depth":11,"bounds":{"left":0.10976563,"top":0.12638889,"width":0.04609375,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.","depth":10,"bounds":{"left":0.10976563,"top":0.12638889,"width":0.25351563,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Review this update","depth":10,"bounds":{"left":0.36328125,"top":0.12638889,"width":0.048046876,"height":0.011805556},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Review this update","depth":11,"bounds":{"left":0.36328125,"top":0.12638889,"width":0.048046876,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"and manage your preferences in your","depth":10,"bounds":{"left":0.41132814,"top":0.12638889,"width":0.096875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"GitHub account settings","depth":10,"bounds":{"left":0.50820315,"top":0.12638889,"width":0.061328124,"height":0.011805556},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GitHub account settings","depth":11,"bounds":{"left":0.50820315,"top":0.12638889,"width":0.061328124,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":".","depth":10,"bounds":{"left":0.56953126,"top":0.12638889,"width":0.0015625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Dismiss banner","depth":9,"bounds":{"left":0.9785156,"top":0.12083333,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Review requested","depth":15,"bounds":{"left":0.32109374,"top":0.17569445,"width":0.000390625,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Review requested","depth":16,"bounds":{"left":0.32109374,"top":0.17708333,"width":0.046875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Vasil-Jiminny","depth":15,"bounds":{"left":0.32109374,"top":0.17708333,"width":0.035546876,"height":0.011805556},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Vasil-Jiminny","depth":16,"bounds":{"left":0.32109374,"top":0.17708333,"width":0.035546876,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"requested your review on this pull request.","depth":15,"bounds":{"left":0.3582031,"top":0.17708333,"width":0.107421875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Add your review","depth":14,"bounds":{"left":0.73476565,"top":0.17291667,"width":0.043359376,"height":0.019444445},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Add your review","depth":16,"bounds":{"left":0.73828125,"top":0.17777778,"width":0.036328126,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Jy 20541 stale records pr 1 #11949 Edit title","depth":13,"bounds":{"left":0.30664062,"top":0.21041666,"width":0.20273438,"height":0.027777778},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Jy 20541 stale records pr 1","depth":14,"bounds":{"left":0.30664062,"top":0.21111111,"width":0.14375,"height":0.02638889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"#","depth":15,"bounds":{"left":0.45351562,"top":0.21111111,"width":0.0078125,"height":0.02638889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"11949","depth":15,"bounds":{"left":0.46132812,"top":0.21111111,"width":0.033984374,"height":0.02638889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Edit title","depth":14,"bounds":{"left":0.496875,"top":0.21319444,"width":0.0125,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Awaiting approval","depth":13,"bounds":{"left":0.6816406,"top":0.21597221,"width":0.06523438,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Awaiting approval","depth":15,"bounds":{"left":0.69609374,"top":0.22152779,"width":0.045703124,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXMenuButton","text":"Code","depth":13,"bounds":{"left":0.7484375,"top":0.21597221,"width":0.033203125,"height":0.022222223},"help_text":"","role_description":"menu button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Code","depth":15,"bounds":{"left":0.7535156,"top":0.22152779,"width":0.013671875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Open","depth":13,"bounds":{"left":0.3191406,"top":0.24930556,"width":0.0140625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Vasil-Jiminny","depth":15,"bounds":{"left":0.34101564,"top":0.24652778,"width":0.035546876,"height":0.014583333},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Vasil-Jiminny","depth":16,"bounds":{"left":0.34101564,"top":0.24791667,"width":0.035546876,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"wants to merge 18 commits into","depth":15,"bounds":{"left":0.378125,"top":0.24791667,"width":0.08046875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"master","depth":15,"bounds":{"left":0.46015626,"top":0.24652778,"width":0.021875,"height":0.015277778},"role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"master","depth":16,"bounds":{"left":0.4625,"top":0.24861111,"width":0.0171875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"from","depth":16,"bounds":{"left":0.48359376,"top":0.24791667,"width":0.01171875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"JY-20541-stale-records-pr-1","depth":16,"bounds":{"left":0.496875,"top":0.24652778,"width":0.08085938,"height":0.015277778},"role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"JY-20541-stale-records-pr-1","depth":17,"bounds":{"left":0.49921876,"top":0.24861111,"width":0.076171875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Copy head branch name to clipboard","depth":16,"bounds":{"left":0.5792969,"top":0.24444444,"width":0.0109375,"height":0.019444445},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Lines changed: 183 additions & 33 deletions","depth":14,"bounds":{"left":0.7410156,"top":0.29305556,"width":0.0234375,"height":0.099305555},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
3764232061660172918
|
-7992387746871444914
|
visual_change
|
accessibility
|
NULL
|
JY-20543 add AJ reports User pilot tracking by Lak JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Pipelines - jiminny/app
Feed — jiminny — Sentry
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
Platform Sprint 1 Q2 - Platform Team - Scrum Board - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
Console Home | Console Home | us-east-2
Console Home | Console Home | us-east-2
SecurityGroup | EC2 | us-east-2
SecurityGroup | EC2 | us-east-2
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
SRD-6779 | JY-20632 | Unable to log in to Sidekick with SSO by yalokin-jiminny · Pull Request #11935 · jiminny/app
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jy 19798 evaluation for ai activity types by nikolaybiaivanov · Pull Request #468 · jiminny/prophet
Jiminny
Jiminny
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Ask Jiminny test report - 8 Apr 2026 - Ask Jiminny test report - 13 Apr 2026.pdf
Service-Desk - Queues - Platform team - Service space - Jira
Service-Desk - Queues - Platform team - Service space - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
New Tab
New Tab
CloudWatch | us-east-2
CloudWatch | us-east-2
Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app
Jy 20541 stale records pr 1 by Vasil-Jiminny · Pull Request #11949 · jiminny/app
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Skip to content
Skip to content
Open menu
Homepage (g then d)
jiminny
jiminny
app
app
Search or jump to…
Type
/
to search
Chat with Copilot
Open Copilot…
Create new...
Issues(g then i)
Pull requests
Repositories
You have unread notifications(g then n)
Open user navigation menu
Repository navigation
Repository navigation
Code
Code
Pull requests (28)
Pull requests
(
28
)
Agents
Agents
Actions
Actions
Wiki
Wiki
Security and quality (24)
Security and quality
(
24
)
Insights
Insights
Settings
Settings
Important update
Important update
On April 24 we'll start using GitHub Copilot interaction data for AI model training unless you opt out.
Review this update
Review this update
and manage your preferences in your
GitHub account settings
GitHub account settings
.
Dismiss banner
Review requested
Review requested
Vasil-Jiminny
Vasil-Jiminny
requested your review on this pull request.
Add your review
Add your review
Jy 20541 stale records pr 1 #11949 Edit title
Jy 20541 stale records pr 1
#
11949
Edit title
Awaiting approval
Awaiting approval
Code
Code
Open
Vasil-Jiminny
Vasil-Jiminny
wants to merge 18 commits into
master
master
from
JY-20541-stale-records-pr-1
JY-20541-stale-records-pr-1
Copy head branch name to clipboard
Lines changed: 183 additions & 33 deletions...
|
NULL
|
|
12461
|
NULL
|
0
|
2026-04-14T11:20:32.402306+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165632402_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactorToolsWindow#11894 on JY-18909-automated-reports-ask-iminny ~HelpProject vProphetAiv D Reports© AutomatedReportsC© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersC Vocabulary@Zoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p©FlushRolesPermissionsC©GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.fcJiminnvcacheclearcom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom© RecalculateDealRisksCa© RemoveDeleteMarkersC© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpAddLayoutchuitles.ono© TrackProviderInstalledEvent.phpJiminnyDeouecommana.ongAutomaleakeporscommana.ongAutomatedReportsSendCommand.phpC Team.phpC AutomatedReportsRepository.phpC) AutomatedReportsService.php© CreateHeldActivityEvent.php© CreateActivityLoggedEvent.php© RequestGenerateAskJiminnyReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© RequestGenerateReportJob.php© AutomatedReportResult.phpC AutomatedReport.php11511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115211541155156157158163164165class Automacedkeporcscommand extends commandonwvare runcron orocessreoorys scrno otrequency. vool$this->logger-›info(self::L0G_PREFIX . " Found {$reports->count()} $frequency reports to process") ;/** @var AutomatedReport $report */foreach ($reports as $report) {$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [reрorcuuла → флероги-десuna.'teamId' = $report->getTeamId,'frequency' => Sreport->getFrequencyo.'type' => $report->getType(),I);$job = $report->isAskJiminnyReport()? new RequestGenerateAskJiminnyReportJob($report->getUvid():new RequestGenerateReportJob($report->getUvid());$this->dispatcher->dispatch(Sjob);1 usageprivate function getReportById(string $reportId): Collection$report = $this->reportRepository->findById0rUuid($reportId);if ($report === null) {$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportid' => $reportIdl);$this->warn( string: "Report not found: {$reportId}");return collect();if (! $report->getStatus()) {$this->logger->warning(self::LOG_PREFIX.Report is inactive, processing anyway (manual override)', ['reportId' = $reportId,'reportUuid' => $report->getUvid(),1);$this-›warn ( string: 'Report is inactive - processing anyway (manual override). ');$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) {$this->logger->warning(self::LOG_PREFIX'reportId' => $reportId,'reportUuid' => $report->getUuid(),'teamId' => $report->getTeamId(),=> "taam->detStarus(lTeam is not active, processing anyway (manual override)', [1);$this->warn( string: "Team #{$report->getTeamId()} is not active - processing anyway (manual override).");Pushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (51 minutes ago)liblSupport Daily • in 40 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 14:20:32= custom.log= laravel.logAskJiminnykeporiAcuivilyservice.ono© AskJiminnyReportActivityServiceTest.phpX: AutovA SF [jiminny@localhost]A HS_local [jiminny@localhost]© ActivitySearch.phpc Onbemanavzcontroller.ono© RequestGenerateAskJiminnyReportJobTest.phpPavaroundvA console [PROD]C HistoryService.phpA console (EU]Al console [STAGING] >© FilterDefinitionCollection.php© Criteriaphp X040A2 A Y O 521522523524525526527528524530531532533534535536537538539540541542543544545546547548549550551552553554556558559560561D04563564565566567568569Ma lminnvvJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':016 A13 V.13 лselect * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * fromplaybooks wnere team_1d = 1;select x Trol•avoooks Vnere 10 =1o.seLect x TrOlpLaydook cacecorles wnere playbook 10 = 1/51select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm provider id IS NOT NULLIand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<-›1..n: on cl.id = pl. layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r. frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expines.at IS NULL):select * from automated_ report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_select * from automated_report_results where reRont.id IN (34, 35);W Windsurf Teams139.UTF-84 spaces...
|
NULL
|
4972927456082703211
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactorToolsWindow#11894 on JY-18909-automated-reports-ask-iminny ~HelpProject vProphetAiv D Reports© AutomatedReportsC© AutomatedReportsRe© AutomatedReportsSt© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersC Vocabulary@Zoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p©FlushRolesPermissionsC©GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic©ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.fcJiminnvcacheclearcom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom© RecalculateDealRisksCa© RemoveDeleteMarkersC© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.phpAddLayoutchuitles.ono© TrackProviderInstalledEvent.phpJiminnyDeouecommana.ongAutomaleakeporscommana.ongAutomatedReportsSendCommand.phpC Team.phpC AutomatedReportsRepository.phpC) AutomatedReportsService.php© CreateHeldActivityEvent.php© CreateActivityLoggedEvent.php© RequestGenerateAskJiminnyReportJob.php© UserPilotActivityListener.php© ActivityLogged.php© RequestGenerateReportJob.php© AutomatedReportResult.phpC AutomatedReport.php11511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115211541155156157158163164165class Automacedkeporcscommand extends commandonwvare runcron orocessreoorys scrno otrequency. vool$this->logger-›info(self::L0G_PREFIX . " Found {$reports->count()} $frequency reports to process") ;/** @var AutomatedReport $report */foreach ($reports as $report) {$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [reрorcuuла → флероги-десuna.'teamId' = $report->getTeamId,'frequency' => Sreport->getFrequencyo.'type' => $report->getType(),I);$job = $report->isAskJiminnyReport()? new RequestGenerateAskJiminnyReportJob($report->getUvid():new RequestGenerateReportJob($report->getUvid());$this->dispatcher->dispatch(Sjob);1 usageprivate function getReportById(string $reportId): Collection$report = $this->reportRepository->findById0rUuid($reportId);if ($report === null) {$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportid' => $reportIdl);$this->warn( string: "Report not found: {$reportId}");return collect();if (! $report->getStatus()) {$this->logger->warning(self::LOG_PREFIX.Report is inactive, processing anyway (manual override)', ['reportId' = $reportId,'reportUuid' => $report->getUvid(),1);$this-›warn ( string: 'Report is inactive - processing anyway (manual override). ');$team = $report->getTeam();if ($team->getStatus() !== Team::STATUS_ACTIVE) {$this->logger->warning(self::LOG_PREFIX'reportId' => $reportId,'reportUuid' => $report->getUuid(),'teamId' => $report->getTeamId(),=> "taam->detStarus(lTeam is not active, processing anyway (manual override)', [1);$this->warn( string: "Team #{$report->getTeamId()} is not active - processing anyway (manual override).");Pushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (51 minutes ago)liblSupport Daily • in 40 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 14:20:32= custom.log= laravel.logAskJiminnykeporiAcuivilyservice.ono© AskJiminnyReportActivityServiceTest.phpX: AutovA SF [jiminny@localhost]A HS_local [jiminny@localhost]© ActivitySearch.phpc Onbemanavzcontroller.ono© RequestGenerateAskJiminnyReportJobTest.phpPavaroundvA console [PROD]C HistoryService.phpA console (EU]Al console [STAGING] >© FilterDefinitionCollection.php© Criteriaphp X040A2 A Y O 521522523524525526527528524530531532533534535536537538539540541542543544545546547548549550551552553554556558559560561D04563564565566567568569Ma lminnvvJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':016 A13 V.13 лselect * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<->1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * fromplaybooks wnere team_1d = 1;select x Trol•avoooks Vnere 10 =1o.seLect x TrOlpLaydook cacecorles wnere playbook 10 = 1/51select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm provider id IS NOT NULLIand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<-›1..n: on cl.id = pl. layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r. frequency = 'daily'and r.status = 1AND t.status = 'active'AND (r.exRires.at >= now() OR r.expines.at IS NULL):select * from automated_ report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_select * from automated_report_results where reRont.id IN (34, 35);W Windsurf Teams139.UTF-84 spaces...
|
NULL
|
|
12462
|
NULL
|
0
|
2026-04-14T11:20:33.563214+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165633563_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2Shell EditViewSessionScriptsProfilesWindowHe iTerm2Shell EditViewSessionScriptsProfilesWindowHelpall• Support Daily • in 40 ml100% C 8Tue 14 Apr 14:20:33ec2-user@ip-10-30-93-249:~DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-…..84-zsh885-zsh86-zsh$7* Unable to acce..88root@73b64f5d54a3:/home/jiminny#ny && bash"root@c78a087b1345:/home/jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockerps--format"{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jimin{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}[2026-04-1410:46:08Jstaging.INF0: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reportsab83a0f5432"}{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca", "trace_id":"185df6f6-4327-4609-9cZe-2[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to process{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" : "185df6f6-4327-460[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" : 1, "frequency" : ","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId" :1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8", "teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"})[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports] Automated reportfound Test 6[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily9-b635-2aa52627f c27"}reports to process{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id" :"1f894bf6-e50d-4e9[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}"teamId" :1, "frequency":"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$D...
|
NULL
|
-1039251355307006269
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2Shell EditViewSessionScriptsProfilesWindowHe iTerm2Shell EditViewSessionScriptsProfilesWindowHelpall• Support Daily • in 40 ml100% C 8Tue 14 Apr 14:20:33ec2-user@ip-10-30-93-249:~DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-…..84-zsh885-zsh86-zsh$7* Unable to acce..88root@73b64f5d54a3:/home/jiminny#ny && bash"root@c78a087b1345:/home/jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockerps--format"{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jimin{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}[2026-04-1410:46:08Jstaging.INF0: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reportsab83a0f5432"}{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca", "trace_id":"185df6f6-4327-4609-9cZe-2[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to process{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" : "185df6f6-4327-460[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" : 1, "frequency" : ","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId" :1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8", "teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"})[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports] Automated reportfound Test 6[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily9-b635-2aa52627f c27"}reports to process{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id" :"1f894bf6-e50d-4e9[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}"teamId" :1, "frequency":"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$D...
|
NULL
|
|
12463
|
269
|
0
|
2026-04-14T11:20:35.292305+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165635292_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsCommand.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] string
*/
protected $signature = 'automated-reports
{--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly).
Use --report-id to manually trigger a specific report by ID or UUID.';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
$reportId = $this->option('report-id');
if ($reportId !== null) {
$reports = $this->getReportById($reportId);
} else {
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
}
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
$this->dispatcher->dispatch($job);
}
}
private function getReportById(string $reportId): Collection
{
$report = $this->reportRepository->findByIdOrUuid($reportId);
if ($report === null) {
$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);
$this->warn("Report not found: {$reportId}");
return collect();
}
if (! $report->getStatus()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
]);
$this->warn('Report is inactive — processing anyway (manual override).');
}
$team = $report->getTeam();
if ($team->getStatus() !== Team::STATUS_ACTIVE) {
$this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'teamStatus' => $team->getStatus(),
]);
$this->warn("Team #{$report->getTeamId()} is not active — processing anyway (manual override).");
}
if ($report->isExpired()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'expiresAt' => $report->getExpiresAt()?->toDateString(),
]);
$this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');
}
$this->info(self::LOG_PREFIX . ' Automated report found ' . $report->getCustomName());
return collect([$report]);
}
}
Project
Project
New File or Directory…...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.5480469,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5582031,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.57109374,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.58125,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5914062,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.60429686,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6171875,"top":0.10763889,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.6484375,"top":0.10763889,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.66132814,"top":0.10763889,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.10763889,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.94257814,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.12916666,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.96953124,"top":0.12777779,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.978125,"top":0.12777779,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports;\nselect * from automated_report_results where report_id IN (34, 35);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.509375,"top":0.15208334,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.52070314,"top":0.15069444,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.5292969,"top":0.15069444,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Support\\Collection;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports \n {--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly). \n Use --report-id to manually trigger a specific report by ID or UUID.';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n $reportId = $this->option('report-id');\n if ($reportId !== null) {\n $reports = $this->getReportById($reportId);\n } else {\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n }\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n $this->dispatcher->dispatch($job);\n }\n }\n\n private function getReportById(string $reportId): Collection\n {\n $report = $this->reportRepository->findByIdOrUuid($reportId);\n\n if ($report === null) {\n $this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);\n $this->warn(\"Report not found: {$reportId}\");\n\n return collect();\n }\n\n if (! $report->getStatus()) {\n $this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n ]);\n $this->warn('Report is inactive — processing anyway (manual override).');\n }\n\n $team = $report->getTeam();\n if ($team->getStatus() !== Team::STATUS_ACTIVE) {\n $this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'teamStatus' => $team->getStatus(),\n ]);\n $this->warn(\"Team #{$report->getTeamId()} is not active — processing anyway (manual override).\");\n }\n\n if ($report->isExpired()) {\n $this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n 'expiresAt' => $report->getExpiresAt()?->toDateString(),\n ]);\n $this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');\n }\n\n $this->info(self::LOG_PREFIX . ' Automated report found ' . $report->getCustomName());\n\n return collect([$report]);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands\\Reports;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Support\\Collection;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateReportJob;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\n\nclass AutomatedReportsCommand extends Command\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[automated-reports]';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'automated-reports \n {--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly). \n Use --report-id to manually trigger a specific report by ID or UUID.';\n\n\n public function __construct(\n private readonly LoggerInterface $logger,\n private readonly BusDispatcher $dispatcher,\n private readonly AutomatedReportsRepository $reportRepository\n ) {\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(): int\n {\n $this->logger->info(self::LOG_PREFIX . ' Started');\n\n $now = Carbon::now();\n $isMonday = $now->isMonday();\n $isFirstDayOfMonth = $now->day === 1;\n $currentMonth = $now->month;\n\n // Check if the current month is a quarterly month (January, April, July, October)\n $isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);\n\n $this->logger->info(self::LOG_PREFIX . ' Checking conditions', [\n 'isMonday' => $isMonday,\n 'isFirstDayOfMonth' => $isFirstDayOfMonth,\n 'currentMonth' => $currentMonth,\n 'isQuarterlyMonth' => $isQuarterlyMonth,\n ]);\n\n // Process daily reports\n $this->processReports(AutomatedReportsService::FREQUENCY_DAILY);\n\n // Process weekly reports on Mondays\n if ($isMonday) {\n $this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);\n }\n\n // Process monthly reports on the first day of the month\n if ($isFirstDayOfMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);\n }\n\n // Process quarterly reports on the first day of January, April, July, and October\n if ($isFirstDayOfMonth && $isQuarterlyMonth) {\n $this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);\n }\n\n $this->logger->info(self::LOG_PREFIX . ' Completed');\n\n return 0;\n }\n\n /**\n * Process reports for a specific frequency.\n *\n * @param string $frequency\n *\n * @return void\n */\n private function processReports(string $frequency): void\n {\n $this->logger->info(self::LOG_PREFIX . \" Processing $frequency reports\");\n\n $reportId = $this->option('report-id');\n if ($reportId !== null) {\n $reports = $this->getReportById($reportId);\n } else {\n // Get all enabled, not deleted reports with active teams for the specified frequency\n $reports = $this->reportRepository->getActiveReportsByFrequency($frequency);\n }\n\n $this->logger->info(self::LOG_PREFIX . \" Found {$reports->count()} $frequency reports to process\");\n\n /** @var AutomatedReport $report */\n foreach ($reports as $report) {\n $this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'frequency' => $report->getFrequency(),\n 'type' => $report->getType(),\n ]);\n\n $job = $report->isAskJiminnyReport()\n ? new RequestGenerateAskJiminnyReportJob($report->getUuid())\n : new RequestGenerateReportJob($report->getUuid());\n\n $this->dispatcher->dispatch($job);\n }\n }\n\n private function getReportById(string $reportId): Collection\n {\n $report = $this->reportRepository->findByIdOrUuid($reportId);\n\n if ($report === null) {\n $this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);\n $this->warn(\"Report not found: {$reportId}\");\n\n return collect();\n }\n\n if (! $report->getStatus()) {\n $this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n ]);\n $this->warn('Report is inactive — processing anyway (manual override).');\n }\n\n $team = $report->getTeam();\n if ($team->getStatus() !== Team::STATUS_ACTIVE) {\n $this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n 'teamId' => $report->getTeamId(),\n 'teamStatus' => $team->getStatus(),\n ]);\n $this->warn(\"Team #{$report->getTeamId()} is not active — processing anyway (manual override).\");\n }\n\n if ($report->isExpired()) {\n $this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [\n 'reportId' => $reportId,\n 'reportUuid' => $report->getUuid(),\n 'expiresAt' => $report->getExpiresAt()?->toDateString(),\n ]);\n $this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');\n }\n\n $this->info(self::LOG_PREFIX . ' Automated report found ' . $report->getCustomName());\n\n return collect([$report]);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4791913883229956910
|
6686649022737167437
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
13
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
[URL_WITH_CREDENTIALS] string
*/
protected $signature = 'automated-reports
{--report-id= : Process a specific report by ID or UUID (bypasses frequency scheduling)}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Process automated reports based on their frequency (weekly, monthly, quarterly).
Use --report-id to manually trigger a specific report by ID or UUID.';
public function __construct(
private readonly LoggerInterface $logger,
private readonly BusDispatcher $dispatcher,
private readonly AutomatedReportsRepository $reportRepository
) {
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle(): int
{
$this->logger->info(self::LOG_PREFIX . ' Started');
$now = Carbon::now();
$isMonday = $now->isMonday();
$isFirstDayOfMonth = $now->day === 1;
$currentMonth = $now->month;
// Check if the current month is a quarterly month (January, April, July, October)
$isQuarterlyMonth = in_array($currentMonth, [1, 4, 7, 10], true);
$this->logger->info(self::LOG_PREFIX . ' Checking conditions', [
'isMonday' => $isMonday,
'isFirstDayOfMonth' => $isFirstDayOfMonth,
'currentMonth' => $currentMonth,
'isQuarterlyMonth' => $isQuarterlyMonth,
]);
// Process daily reports
$this->processReports(AutomatedReportsService::FREQUENCY_DAILY);
// Process weekly reports on Mondays
if ($isMonday) {
$this->processReports(AutomatedReportsService::FREQUENCY_WEEKLY);
}
// Process monthly reports on the first day of the month
if ($isFirstDayOfMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_MONTHLY);
}
// Process quarterly reports on the first day of January, April, July, and October
if ($isFirstDayOfMonth && $isQuarterlyMonth) {
$this->processReports(AutomatedReportsService::FREQUENCY_QUARTERLY);
}
$this->logger->info(self::LOG_PREFIX . ' Completed');
return 0;
}
/**
* Process reports for a specific frequency.
*
* @param string $frequency
*
* @return void
*/
private function processReports(string $frequency): void
{
$this->logger->info(self::LOG_PREFIX . " Processing $frequency reports");
$reportId = $this->option('report-id');
if ($reportId !== null) {
$reports = $this->getReportById($reportId);
} else {
// Get all enabled, not deleted reports with active teams for the specified frequency
$reports = $this->reportRepository->getActiveReportsByFrequency($frequency);
}
$this->logger->info(self::LOG_PREFIX . " Found {$reports->count()} $frequency reports to process");
/** @var AutomatedReport $report */
foreach ($reports as $report) {
$this->logger->info(self::LOG_PREFIX . ' Dispatching Generate Report job for report', [
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'frequency' => $report->getFrequency(),
'type' => $report->getType(),
]);
$job = $report->isAskJiminnyReport()
? new RequestGenerateAskJiminnyReportJob($report->getUuid())
: new RequestGenerateReportJob($report->getUuid());
$this->dispatcher->dispatch($job);
}
}
private function getReportById(string $reportId): Collection
{
$report = $this->reportRepository->findByIdOrUuid($reportId);
if ($report === null) {
$this->logger->warning(self::LOG_PREFIX . ' Report not found for --report-id', ['reportId' => $reportId]);
$this->warn("Report not found: {$reportId}");
return collect();
}
if (! $report->getStatus()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is inactive, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
]);
$this->warn('Report is inactive — processing anyway (manual override).');
}
$team = $report->getTeam();
if ($team->getStatus() !== Team::STATUS_ACTIVE) {
$this->logger->warning(self::LOG_PREFIX . ' Team is not active, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'teamId' => $report->getTeamId(),
'teamStatus' => $team->getStatus(),
]);
$this->warn("Team #{$report->getTeamId()} is not active — processing anyway (manual override).");
}
if ($report->isExpired()) {
$this->logger->warning(self::LOG_PREFIX . ' Report is expired, processing anyway (manual override)', [
'reportId' => $reportId,
'reportUuid' => $report->getUuid(),
'expiresAt' => $report->getExpiresAt()?->toDateString(),
]);
$this->warn('Report is expired (expires_at: ' . $report->getExpiresAt()?->toDateString() . ') — processing anyway (manual override).');
}
$this->info(self::LOG_PREFIX . ' Automated report found ' . $report->getCustomName());
return collect([$report]);
}
}
Project
Project
New File or Directory…...
|
12461
|
|
12464
|
268
|
0
|
2026-04-14T11:20:35.307275+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165635307_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2Shell EditViewSessionScriptsProfilesWindowHe iTerm2Shell EditViewSessionScriptsProfilesWindowHelpall• Support Daily • in 40 ml100% C 8Tue 14 Apr 14:20:34ec2-user@ip-10-30-93-249:~DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-…..84-zsh885-zsh86-zsh$7* Unable to acce..88root@73b64f5d54a3:/home/jiminny#ny && bash"root@c78a087b1345:/home/jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockerps--format"{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jimin{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}[2026-04-1410:46:08Jstaging.INF0: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reportsab83a0f5432"}{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9c2e-2[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to process{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id": "185df6f6-4327-460[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" : 1, "frequency" : ","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId" :1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8", "teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"})[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports] Automated reportfound Test 6[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily9-b635-2aa52627f c27"}reports to process{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id" :"1f894bf6-e50d-4e9[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}"teamId" :1, "frequency":"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$D...
|
NULL
|
5754993928416843300
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2Shell EditViewSessionScriptsProfilesWindowHe iTerm2Shell EditViewSessionScriptsProfilesWindowHelpall• Support Daily • in 40 ml100% C 8Tue 14 Apr 14:20:34ec2-user@ip-10-30-93-249:~DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-…..84-zsh885-zsh86-zsh$7* Unable to acce..88root@73b64f5d54a3:/home/jiminny#ny && bash"root@c78a087b1345:/home/jiminny# php artisan automated-reports[2026-04-14 10:46:08] staging.INF0: [automated-reports] Started[ec2-user@ip-10-30-93-249 ~]$ dockerexec -it $(dockerps--format"{{.ID}}" --filter "name=ecs-worker"1 head -1) /bin/bash -c "cd /home/jimin{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}[2026-04-1410:46:08Jstaging.INF0: [automated-reports] Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth": true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}[2026-04-14 10:46:08]staging.INFO: [automated-reports] Processing daily reportsab83a0f5432"}{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id" :"185df6f6-4327-4609-9c2e-2[2026-04-1410:46:08]9-9c2e-2ab83a0f5432"}staging.INFO: [automated-reports]Found 3 daily reports to process{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id": "185df6f6-4327-460[2026-04-1410:46:087daily"staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9", "teamId" : 1, "frequency" : ","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid": "63e6d70b-b7cb-4dfa-8443-53453e6c4054", "teamId" :1, "frequency" : "daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80cab", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}[2026-04-14 10:46:08]staging. INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8", "teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id" :"185df6f6-4327-4609-9cZe-2ab83a0f5432"})[2026-04-14 10:46:08]staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# phpartisanautomated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports]Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth": false, "currentMonth":4, "isQuarterlyMonth" :true} {"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]staging.INFO: [automated-reports]Processing daily reportsaa52627fc27"}{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports] Automated reportfound Test 6[2026-04-14 10:48:42]staging.INFO: [automated-reports] Found 1 daily9-b635-2aa52627f c27"}reports to process{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id" :"1f894bf6-e50d-4e9[2026-04-14 10:48:42]staging.INF0: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}"teamId" :1, "frequency":"[2026-04-14 10:48:42]staging.INFO: [automated-reports]Completed{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$D...
|
12462
|
|
12575
|
NULL
|
0
|
2026-04-14T11:25:29.357367+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165929357_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelplalol= Support Daily • in 35 mlA100% CTue 14 Apr 14:25:28•ec2-user@ip-10-30-93-249:~L₴81DOCKER© *1DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-...₴4-zsh|885-zsh86-zsh0 87* Unable to acce...88[2026-04-1410:46:087staging. INFO:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}"teamId" :1, "frequency":"[2026-04-14 10:46:08] staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88", "trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-1410:48:42]staging.INF0: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth" : true}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]aa52627fc27"}staging.INFO: [automated-reports]Processing daily reports{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports]Automated report found Test 6[2026-04-1410:48:42]staging. INFO: [automated-reports]Found 1 daily reports to process9-b635-2aa52627f c27"}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e9[2026-04-14 10:48:42] staging.INF0: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8".,"teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"246a1ala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"})[2026-04-14 10:48:42] staging.INFO: [automated-reports]Completed{"correlation_id":"246ala1a-7076-458c-bd7d-49d2f5a2db88", "trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@b79a4bdd6905:/home/jiminny# phpartisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id" : "8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[automated-reports] Automated report found Tuesday report[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 dailyreports to process5-acd0-86c51b5659a5"}{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-447[2026-04-14 11:22:33]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId" :1, "frequency": "daily", "type": "ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b"|',"trace_id": "8e05a574-88d0-4475-acd0-86c51b5659a5"})[2026-04-14 11:22:33] staging.INFO: [automated-reports]Completed{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"})root@b79a4bdd6905:/home/jiminny#l...
|
NULL
|
1913356096668575636
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelplalol= Support Daily • in 35 mlA100% CTue 14 Apr 14:25:28•ec2-user@ip-10-30-93-249:~L₴81DOCKER© *1DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-...₴4-zsh|885-zsh86-zsh0 87* Unable to acce...88[2026-04-1410:46:087staging. INFO:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}"teamId" :1, "frequency":"[2026-04-14 10:46:08] staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88", "trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-1410:48:42]staging.INF0: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth" : true}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]aa52627fc27"}staging.INFO: [automated-reports]Processing daily reports{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports]Automated report found Test 6[2026-04-1410:48:42]staging. INFO: [automated-reports]Found 1 daily reports to process9-b635-2aa52627f c27"}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e9[2026-04-14 10:48:42] staging.INF0: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8".,"teamId" :1, "frequency" :"daily", "type": "ask_jiminny"} {"correlation_id":"246a1ala-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"})[2026-04-14 10:48:42] staging.INFO: [automated-reports]Completed{"correlation_id":"246ala1a-7076-458c-bd7d-49d2f5a2db88", "trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@b79a4bdd6905:/home/jiminny# phpartisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id" : "8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[automated-reports] Automated report found Tuesday report[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 dailyreports to process5-acd0-86c51b5659a5"}{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-447[2026-04-14 11:22:33]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId" :1, "frequency": "daily", "type": "ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b"|',"trace_id": "8e05a574-88d0-4475-acd0-86c51b5659a5"})[2026-04-14 11:22:33] staging.INFO: [automated-reports]Completed{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"})root@b79a4bdd6905:/home/jiminny#l...
|
12573
|
|
12576
|
NULL
|
0
|
2026-04-14T11:25:30.055339+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165930055_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny ~ToolsWindowHelpProject v© BaseController.php© CalendarController.p© ReportController.php© SoftphoneWebhookC© AbstractController.php• CommentContextlnterfa© ConferencesOptlnOutCr© Controller.phpExportController.phprrontenacontroller.phpT) FrontendControllerTraitC GeocodingController.ph© HealthCheckController.;LiveCoachController.ph/© MissingTeamController.© MobileController.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.phpPusnercontroller.phpSlackController.phpSupportController.php© TeamSetupController.pt© UserAutomatedReports© WelcomeController.php> C Middleware> D Requests> D Resources> D Responses> MSerializers> M Transformers© Kernel.php€ PlaylistTrackResourceTrait€ ValidateCrmConnectionRes> D IntegrationsD InteractionsO JobsD ActivityA AutomationC AjReports> MAudiov M AutomatedReportsc recuestceneareask.in(c reuestcenertereoone senareoonJoo.ono© SendReportMailJob.phpD CalendarD CrmDealRisks• MailboxMeetingBotMiddlleware_ Streaming>MTeam> M Telephonv> D User© BaseProcessingJob.phpc) DummyJob.php© ReportController.php xAutomaleakeporscommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpAulomaleakeporisservice.onpCreateHeldActivityEvent.php© AddLayoutEntities.php© TrackProviderInstalledEvent.php) CreateActivityLoggedEvent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C) RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.php© AutomatedReport.phpclass ReportController extends AbstractControllerpublic function ready(Request $request): JsonResponse'status' => $this->callbackService->getPrimaryStatus($report, $payload),''response' => Spayload.'generated_at' => $now,© Team.php100101102103104105106108109110111112113114115116117118119120121122123124125126I);// if a podcast is set, update it$reportPodcast?->update(['status' = $this->callbackService->getPodcastStatus($payload),'response' = $payload,'generated_at'= $now,1):$this->logger->info(self::LOG_PREFIX . ' Report has been processed', ['uuid' => SreportUuid,'child_uvid' => $reportPodcast?->getUvid(),I);if (! $this->callbackService-›isSuccess($payload)) €$this->logger->warning(self::LOG_PREFIX' Error creating report', $payload);return response()->json(['status' →> 'ok']);// If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {// send the primary reportSthis→>dispatcher→>dispatch(new SendReportJob (Sreportuvid));// send the podcast report if it set and generatedif (SreportPodcast && $reportPodcast->getStatus() === AutomatedReportResult: : STATUS_GENERATED) €Sthis->dispatcher->dispatch(new SendReportJob(reportUvid: $reportPodcast->getUvid()));// Track Datadog metrics for automated reportsSautomatedReport = Sreport->getReportO:$this->callbackService->pushToDatadog($automatedReport, $report);if ($reportPodcast) {$this->callbackService->pushToDatadog($automatedReport, $reportPodcast):$this->eventDispatcher-›dispatch(new AutomatedReportGenerated($automatedReport, $report));} catch (ModelNotFoundException $exception) €$this->logger->error(self::LOG_PREFIX' Report not found', ["Uuo = Dredorcuurlor'error' => Sexception->getMessageO.I):return response()->json(['status' => 'error','message' => 'Report not found'], status: 404);} catch (Throwable $exception) {$this->logger-›error(self::LOG_PREFIX . ' Failed to update report status', ['uuid' = $reportUuid,'error' = $exception->getMessage(),I/ View pull request (56 minutes ago)Support Daily • in 35 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 14:25:29A HS_local [jiminny@localhost]A console [PROD]A console (EU]Al console [STAGING] XGajiminny:16 14 V.13= custom.log5185195205215225235245255265275285245305315335345355365375385571540541542543544545546547548549550551004554555556557558559560561D04563564-565566567568 v569570= laravel.logA SF [jiminny@localhost]Tx: Auto vPlaygroundvU,ellant.Sa.xt.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':select * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * fromplaybookswhere team_ld = 1select x ToIoavoooks Vnere 10 =1o.seLect x TrOlpLaydook cacecorles wnere playbook 10 = 1/51select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<->1..n: on cl.id = pl. layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.frequency = 'daily"and r.status = 1AND t.status = 'active'AND (r.exRines.at >= now() OR r.expires.at IS NULL):select * from automated_ report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_report_results where cepont.ig IN (36);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * fromautomated_report_results where report_id IN (36);W Windsurf Teams99:58UTF-84 spaces...
|
NULL
|
1517785982946377240
|
NULL
|
visual_change
|
ocr
|
NULL
|
PhpStormFileEditFV faVsco.js vViewNavigateCodeLara PhpStormFileEditFV faVsco.js vViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny ~ToolsWindowHelpProject v© BaseController.php© CalendarController.p© ReportController.php© SoftphoneWebhookC© AbstractController.php• CommentContextlnterfa© ConferencesOptlnOutCr© Controller.phpExportController.phprrontenacontroller.phpT) FrontendControllerTraitC GeocodingController.ph© HealthCheckController.;LiveCoachController.ph/© MissingTeamController.© MobileController.php© NotificationController.pt© NotificationProviderConPlaybackController.phpPlaylistController.phpPusnercontroller.phpSlackController.phpSupportController.php© TeamSetupController.pt© UserAutomatedReports© WelcomeController.php> C Middleware> D Requests> D Resources> D Responses> MSerializers> M Transformers© Kernel.php€ PlaylistTrackResourceTrait€ ValidateCrmConnectionRes> D IntegrationsD InteractionsO JobsD ActivityA AutomationC AjReports> MAudiov M AutomatedReportsc recuestceneareask.in(c reuestcenertereoone senareoonJoo.ono© SendReportMailJob.phpD CalendarD CrmDealRisks• MailboxMeetingBotMiddlleware_ Streaming>MTeam> M Telephonv> D User© BaseProcessingJob.phpc) DummyJob.php© ReportController.php xAutomaleakeporscommana.ong© AutomatedReportsSendCommand.phpC AutomatedReportsRepository.phpAulomaleakeporisservice.onpCreateHeldActivityEvent.php© AddLayoutEntities.php© TrackProviderInstalledEvent.php) CreateActivityLoggedEvent.php© ActivityLogged.php© AutomatedReportsCallbackService.php(C) RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.php© AutomatedReport.phpclass ReportController extends AbstractControllerpublic function ready(Request $request): JsonResponse'status' => $this->callbackService->getPrimaryStatus($report, $payload),''response' => Spayload.'generated_at' => $now,© Team.php100101102103104105106108109110111112113114115116117118119120121122123124125126I);// if a podcast is set, update it$reportPodcast?->update(['status' = $this->callbackService->getPodcastStatus($payload),'response' = $payload,'generated_at'= $now,1):$this->logger->info(self::LOG_PREFIX . ' Report has been processed', ['uuid' => SreportUuid,'child_uvid' => $reportPodcast?->getUvid(),I);if (! $this->callbackService-›isSuccess($payload)) €$this->logger->warning(self::LOG_PREFIX' Error creating report', $payload);return response()->json(['status' →> 'ok']);// If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {// send the primary reportSthis→>dispatcher→>dispatch(new SendReportJob (Sreportuvid));// send the podcast report if it set and generatedif (SreportPodcast && $reportPodcast->getStatus() === AutomatedReportResult: : STATUS_GENERATED) €Sthis->dispatcher->dispatch(new SendReportJob(reportUvid: $reportPodcast->getUvid()));// Track Datadog metrics for automated reportsSautomatedReport = Sreport->getReportO:$this->callbackService->pushToDatadog($automatedReport, $report);if ($reportPodcast) {$this->callbackService->pushToDatadog($automatedReport, $reportPodcast):$this->eventDispatcher-›dispatch(new AutomatedReportGenerated($automatedReport, $report));} catch (ModelNotFoundException $exception) €$this->logger->error(self::LOG_PREFIX' Report not found', ["Uuo = Dredorcuurlor'error' => Sexception->getMessageO.I):return response()->json(['status' => 'error','message' => 'Report not found'], status: 404);} catch (Throwable $exception) {$this->logger-›error(self::LOG_PREFIX . ' Failed to update report status', ['uuid' = $reportUuid,'error' = $exception->getMessage(),I/ View pull request (56 minutes ago)Support Daily • in 35 mAAutomatedReportsCommandTestv100% |45]Tue 14 Apr 14:25:29A HS_local [jiminny@localhost]A console [PROD]A console (EU]Al console [STAGING] XGajiminny:16 14 V.13= custom.log5185195205215225235245255265275285245305315335345355365375385571540541542543544545546547548549550551004554555556557558559560561D04563564-565566567568 v569570= laravel.logA SF [jiminny@localhost]Tx: Auto vPlaygroundvU,ellant.Sa.xt.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE u.team_id = 1 and sa.provider = 'salesforce':select * from teams where id = 1;select * from groups g JOIN playbooks p 1.n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * fromplaybookswhere team_ld = 1select x ToIoavoooks Vnere 10 =1o.seLect x TrOlpLaydook cacecorles wnere playbook 10 = 1/51select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm_configuration_id, crm_provider_id, transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCzojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<->1.n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<->1..n: on cl.id = pl. layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reports rjoin teams t on r.team.id = t.idWHERE r.frequency = 'daily"and r.status = 1AND t.status = 'active'AND (r.exRines.at >= now() OR r.expires.at IS NULL):select * from automated_ report_results where ceRontaid IN (18, 33);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_report_results where cepont.ig IN (36);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * fromautomated_report_results where report_id IN (36);W Windsurf Teams99:58UTF-84 spaces...
|
12574
|
|
12577
|
271
|
0
|
2026-04-14T11:25:54.340475+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165954340_m2.jpg...
|
PhpStorm
|
faVsco.js – ReportController.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
14
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by 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 = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from activity_searches where id = 10932;
select * from activity_search_filters where activity_search_id = 10932;
select * from automated_reports order by id desc;
select * from automated_report_results where report_id IN (36);
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Http\Controllers\Webhook;
use Carbon\Carbon;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Exceptions\ModelNotFoundException;
use Jiminny\Http\Controllers\AbstractController;
use Jiminny\Jobs\AutomatedReports\SendReportJob;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsCallbackService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class ReportController extends AbstractController
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[Report Ready]';
public function __construct(
private readonly AutomatedReportsService $automatedReportsService,
private readonly BusDispatcher $dispatcher,
private readonly LoggerInterface $logger,
private readonly AutomatedReportsCallbackService $callbackService,
private readonly EventDispatcher $eventDispatcher,
) {
}
public function ready(Request $request): JsonResponse
{
$payload = $request->all();
$now = Carbon::now();
$this->logger->info(self::LOG_PREFIX . ' Webhook received', [
'payload' => $payload,
]);
// validate
$reportUuid = $this->callbackService->getResultUuid($payload);
if (empty($reportUuid)) {
return response()->json(['status' => 'error', 'message' => 'Request ID is empty'], status: 400);
}
try {
$report = $this->automatedReportsService->getReportResult($reportUuid);
// validate
if ($this->callbackService->isProcessed($report)) {
$this->logger->warning(self::LOG_PREFIX . ' Report has been already processed', [
'uuid' => $reportUuid,
'currentStatus' => $report->getStatusLabel(),
]);
return response()->json(['status' => 'already_processed']);
}
// always try to get a child podcast cause report configuration cannot be trusted
$reportPodcast = $this->automatedReportsService->findChildResult(
result: $report,
type: AutomatedReportsService::MEDIA_TYPE_PODCAST
);
// update results
$report->update([
'status' => $this->callbackService->getPrimaryStatus($report, $payload),
'response' => $payload,
'generated_at' => $now,
]);
// if a podcast is set, update it
$reportPodcast?->update([
'status' => $this->callbackService->getPodcastStatus($payload),
'response' => $payload,
'generated_at' => $now,
]);
$this->logger->info(self::LOG_PREFIX . ' Report has been processed', [
'uuid' => $reportUuid,
'child_uuid' => $reportPodcast?->getUuid(),
]);
if (! $this->callbackService->isSuccess($payload)) {
$this->logger->warning(self::LOG_PREFIX . ' Error creating report', $payload);
return response()->json(['status' => 'ok']);
}
// If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)
if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {
// send the primary report
$this->dispatcher->dispatch(new SendReportJob($reportUuid));
// send the podcast report if it set and generated
if ($reportPodcast && $reportPodcast->getStatus() === AutomatedReportResult::STATUS_GENERATED) {
$this->dispatcher->dispatch(new SendReportJob(reportUuid: $reportPodcast->getUuid()));
}
}
// Track Datadog metrics for automated reports
$automatedReport = $report->getReport();
$this->callbackService->pushToDatadog($automatedReport, $report);
if ($reportPodcast) {
$this->callbackService->pushToDatadog($automatedReport, $reportPodcast);
}
$this->eventDispatcher->dispatch(new AutomatedReportGenerated($automatedReport, $report));
} catch (ModelNotFoundException $exception) {
$this->logger->error(self::LOG_PREFIX . ' Report not found', [
'uuid' => $reportUuid,
'error' => $exception->getMessage(),
]);
return response()->json(['status' => 'error', 'message' => 'Report not found'], status: 404);
} catch (Throwable $exception) {
$this->logger->error(self::LOG_PREFIX . ' Failed to update report status', [
'uuid' => $reportUuid,
'error' => $exception->getMessage(),
]);
return response()->json(['status' => 'error', 'message' => 'Failed to update report status'], status: 500);
}
return response()->json(['status' => 'ok']);
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.5480469,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5582031,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.57109374,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.58125,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5914062,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.60429686,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.6171875,"top":0.06458333,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.6484375,"top":0.06458333,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.66132814,"top":0.06458333,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9515625,"top":0.06458333,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"16","depth":4,"bounds":{"left":0.92890626,"top":0.08611111,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.94257814,"top":0.08611111,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"13","depth":4,"bounds":{"left":0.95625,"top":0.08611111,"width":0.011328125,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.96953124,"top":0.08472222,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.978125,"top":0.08472222,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports order by id desc;\nselect * from automated_report_results where report_id IN (36);","depth":4,"value":"SELECT * FROM teams WHERE id = 1;\n\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;\nSELECT * FROM crm_fields WHERE id = 2234;\nSELECT * FROM crm_field_values WHERE crm_field_id = 2234;\n\nselect * from crm_profiles where user_id = 143;\n\nselect * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO\nselect * from business_processes where crm_configuration_id = 39;\n# 01941000000H669AAC, 01941000000H66JAAS\n\nselect * from record_type_field_values\n where record_type_id IN (24);\n\nselect * from crm_field_values where id IN (2730);\n\nselect * from crm_configurations where id = 39;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce'; #1035\n\n\nselect * from users where team_id = 1; # 222 group 3\nSELECT * FROM activities WHERE user_id = 222 order by id desc;\nselect * from sidekick_settings where team_id = 1;\nselect * from teams where id = 1;\nselect * from team_features where team_id = 1;\n\nselect * from activities where crm_configuration_id = 2\nand provider = 'ms-teams' and id = 608765;\n\nSELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';\n\nselect * from sidekick_settings where team_id = 2;\n\nSELECT * FROM activities WHERE id = 608660;\nselect * from activity_summary_logs where activity_id = 608660;\nselect * from ai_prompts where transcription_id = 11214;\n\n# ********************************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;\n# id: 608818, crm: 59628809737\nSELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;\n# id: 608821, crm: 59632069252\nSELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,\nplaybook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,\nscheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at\nFROM activities a\njoin calendar_events ce on a.calendar_event_id = ce.id\nWHERE a.id IN (608818, 608821);\n\nselect * from users where team_id = 1;\nselect * from team_settings where team_id = 1;\nselect * from crm_profiles where crm_configuration_id = 39 order by user_id;\n\nselect * from team_features where team_id = 1;\n\nselect * from users where team_id = 2;\n\nSELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639\n# Preslava N. Ivanova, grou id 3\n\nSELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;\n\nselect * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';\n\nselect\n a.id,\n a.type,\n a.scheduled_start_time,\n a.actual_start_time,\n a.created_at,\n a.opportunity_id,\n a.status\nFROM activities a\nWHERE opportunity_id = 344\nand status IN ('completed', 'received', 'delivered')\nand (\n (a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')\nOR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))\n;\n\nSELECT * FROM users WHERE id = 222;\n\nSELECT * FROM crm_profiles WHERE user_id = 222;\nselect * from crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;\n\nselect * from group_deal_risk_types;\n\nselect * from opportunities where team_id = 1;\n\nSELECT * FROM opportunities WHERE id = 315;\nSELECT * FROM crm_field_data WHERE object_id = 315;\nselect * from crm_field_data where object_id = 260;\n\nselect * from generic_ai_prompts where subject_id = 315;\n\nselect * from teams; # 36, 21, 121, james.graham@bullhorn.jiminny.com\nSELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';\n\n# ************************************************************************************\nselect * from teams where id = 1;\nselect * from crm_configurations where id = 39;\nselect * from users where team_id = 1;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 1;\n# 1 - 00541000004281rAAA\n# 204 - 0052g000003freeAAA\n# 429 - 0052g000003qGOiAAM\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\nselect * from activities where type = 'softphone'\nand created_at > '2024-12-11 15:24:36' order by id desc;\n\nselect * from activity_providers where team_id = 1;\nselect * from activity_provider_users where activity_provider_id = 328;\n\nselect * from opportunities where crm_configuration_id = 39\nAND account_id = 178 AND is_closed = false\norder by created_at DESC;\n\nselect * from contacts where id = 3952;\nselect * from accounts where id = 178;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations where id = 21;\nselect * from users where team_id = 36;\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 36;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 36\nand sa.provider = 'bullhorn';\n\nselect * from social_accounts where id = 348;\nUPDATE social_accounts SET\nprovider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',\nprovider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',\nexpires = 1733998131,\nstate = 'connected'\nWHERE id = 348;\n\n# ************************************************************************************\nselect * from teams where id = 31;\nselect * from crm_configurations where id = 18;\n\nselect * from users where team_id = 31; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 31;\n\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 31\nand sa.provider = 'close';\n\nselect * from contacts where crm_configuration_id = 18;\n\n# ********************** NEPTUNE **************************************************************\nselect * from teams;\nselect * from users where id IN (1030, 1035, 1052);\nselect * from crm_configurations;\n\nselect * from users where team_id = 65; # 257\nselect * from team_settings where team_id = 65; # 257\nselect * from invitations where team_id = 65; # 257\nselect * from users where email = 'integration-account@jiminny.com'; # 257\nselect u.email, cp.* from users u\njoin crm_profiles cp on u.id = cp.user_id\nwhere u.team_id = 65;\n\nselect * from crm_configurations where id = 53;\nselect * from accounts where crm_configuration_id = 53 order by id desc;\nselect * from leads where crm_configuration_id = 53 order by id desc;\nselect * from contacts where crm_configuration_id = 53 order by id desc;\nselect * from opportunities where crm_configuration_id = 53 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 53 order by id desc;\nselect * from crm_fields where crm_configuration_id = 53 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 53 order by id desc;\nselect * from stages where crm_configuration_id = 53 order by id desc;\n\n\nselect * from crm_profiles where crm_configuration_id = 13;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\nand sa.provider = 'integration-app';\n\nselect * from contacts where crm_configuration_id = 13;\n\nselect * from social_accounts where sociable_id = 283;\n\nSELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';\n\nselect * from activity_providers where team_id = 65;\nSELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 65\n;\n\n# ***************************** STAGING ********************************************\nSELECT * FROM teams;\nSELECT * FROM teams WHERE id = 88;\nSELECT * FROM teams WHERE id = 89;\nselect * from team_settings where team_id = 89;\nSELECT * FROM users WHERE team_id = 89;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 89;\n\nselect * from users;\nSELECT * FROM social_accounts WHERE sociable_id = 1761;\nSELECT * FROM crm_configurations WHERE id = 70;\nselect * from accounts where crm_configuration_id = 70 order by id desc;\nselect * from leads where crm_configuration_id = 70 order by id desc;\nselect * from contacts where crm_configuration_id = 70 order by id desc;\nselect * from opportunities where crm_configuration_id = 70 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 70 order by id desc;\nselect * from crm_fields where crm_configuration_id = 70 order by id desc;\nselect * from crm_field_values where crm_field_id = 3536 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 70 order by id desc;\nselect * from stages where crm_configuration_id = 70 order by id desc;\nselect * from business_processes where crm_configuration_id = 70 order by id desc;\nselect * from business_process_stages where business_process_id = 34;\n\nselect * from contacts where id = 10468;\n\nselect * from crm_layouts where crm_configuration_id = 70;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;\nSELECT * FROM crm_fields WHERE id IN (3533,3534,3535);\n\nselect * from activities where crm_configuration_id = 70\nand (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;\n\nSELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;\nSELECT * FROM activities where crm_configuration_id = 69 ;\n\nSELECT * FROM users WHERE email LIKE '%jiminny_web_sa2@jiminny.com%';\nSELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;\nSELECT * FROM opportunities WHERE id = 385;\n\nselect * from participants p\njoin activities a on p.activity_id = a.id\nwhere a.crm_configuration_id = 70\nand (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);\nSELECT * FROM participants WHERE id = 1013638;\n\nselect * from teams where id = 90;\nselect * from users where team_id = 90;\nselect * from social_accounts where social_accounts.sociable_id IN (1960,1760);\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 71;\nselect * from invitations where team_id = 90;\n\nselect * from crm_configurations where id = 71;\nselect * from accounts where crm_configuration_id = 71 order by id desc;\nselect * from leads where crm_configuration_id = 71 order by id desc;\nselect * from contacts where crm_configuration_id = 71 order by id desc;\nselect * from opportunities where crm_configuration_id = 71 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 71 order by id desc;\nselect * from crm_fields where crm_configuration_id = 71 order by id desc;\nselect * from crm_field_values where crm_field_id = 3341 order by id desc;\nselect * from crm_layouts where crm_configuration_id = 71 order by id desc;\nselect * from stages where crm_configuration_id = 71 order by id desc;\n\nselect * from users order by secondary_email desc;\nselect u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa\n join users u on sa.sociable_id = u.id\nwhere sa.provider = 'google' and u.email LIKE 'aneliya%';\n\nselect * from failed_jobs order by id desc;\n\nselect * from users where email = 'ben.allwright@learningpeople.co.uk' or secondary_email = 'ben.allwright@learningpeople.co.uk';\n\nselect * from teams;\nSELECT * FROM crm_profiles WHERE crm_configuration_id = 39;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 1\nand sa.provider = 'salesforce';\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;\nSELECT * FROM crm_configurations WHERE id = 70;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1;\nselect * from users where team_id = 1;\n\nselect o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o\njoin users u on o.user_id = u.id\njoin groups g on u.group_id = g.id\njoin role_user ru on u.id = ru.user_id\njoin roles r on ru.role_id = r.id\nwhere o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';\n\nselect * from role_user where user_id = 143;\nselect * from roles;\n\nselect * from role_user;\nselect * from groups where id = 9;\nselect * from scope_groups where group_id = 9;\n\n# ************************************************************************************\nselect * from teams where id = 36;\nselect * from crm_configurations;\nSELECT * FROM social_accounts WHERE sociable_id = 121;\n\nhttps://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105\nhttps://crmsandbox.zoho.com/crm/\n\nhttps://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080\n https://crm.zoho.com/crm/\n org3469620\n\nSELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;\n\nselect * from users where email LIKE \"%mobile_automation_%\";\nselect * from social_accounts where sociable_id IN (2228);\nselect * from crm_profiles where user_id IN (2222,2223,2226,2227);\n\nselect * from teams order by id desc;\nSELECT * FROM users WHERE id = 2229;\nSELECT * FROM crm_profiles WHERE user_id = 2229;\nselect * from opportunities where crm_configuration_id = 88;\nselect * from crm_fields where crm_configuration_id = 88;\nselect * from crm_profiles where crm_configuration_id = 88;\n\nSELECT * FROM teams WHERE id = 1;\n\nSELECT * FROM users WHERE id = 143;\nSELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;\n\nhttps://app.staging.jiminny.com/ondemand?\n min_duration=1\n &\n only_recorded=1\n &\n user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e\n &\n sequence_number=2\n\n select * from users where team_id = 1 and email like '%stoyan%'\n\nselect * from coaching_feedbacks;\n\nselect * from teams;\nSELECT * FROM users WHERE team_id = 36;\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from users where id = 143;\n\nSELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\nSELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;\n\nselect * from users where team_id = 2;\nselect * from activities where crm_configuration_id = 39\nand activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'\nAND user_id = 143\norder by id desc;\n\n# ************************************************************************************\nselect * from teams where id = 142; # 2312, 126\nselect * from team_settings;\nselect * from users where team_id = 142; # 21642\nSELECT * FROM social_accounts WHERE sociable_id = 21642;\nSELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;\nselect * from crm_profiles where id IN (93);\nselect * from invitations;\nselect * from team_features where team_id = 1;\n\nSELECT * FROM crm_configurations WHERE id = 126;\nselect * from accounts where crm_configuration_id = 126 order by id desc;\nselect * from leads where crm_configuration_id = 126 order by id desc;\nselect * from contacts where crm_configuration_id = 126 order by id desc;\nselect * from opportunities where crm_configuration_id = 126 order by id desc;\nselect * from crm_profiles where crm_configuration_id = 126 order by id desc;\nselect * from crm_fields where crm_configuration_id = 126 # 11060\n# and type IN ('picklist', 'status')\n# and object_type = 'task'\norder by id desc;\n# 5731,5732,5733\nselect DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;\nselect * from crm_layouts where crm_configuration_id = 126 order by id desc;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);\nselect * from stages where crm_configuration_id = 126 order by id desc;\nselect * from business_processes where crm_configuration_id = 126 order by id desc;\nselect * from business_process_stages where business_process_id IN (76,75,74,73);\nselect * from playbooks where team_id = 142;\nselect * from playbook_layouts where playbook_id IN (108);\nSELECT * FROM playbook_categories WHERE playbook_id IN (108);\n\nselect * from teams where id = 130;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 2\nand sa.provider = 'hubspot';\n\nSELECT * FROM activities\n WHERE crm_configuration_id = 110;\n\nselect * from teams;\nselect * from crm_configurations;\n\nSELECT * FROM activities WHERE id = 628773;\nSELECT * FROM crm_profiles WHERE user_id = 1460;\nSELECT * FROM social_accounts WHERE sociable_id = 2291;\n\nselect * from teams;\nselect ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id\njoin permission_role pr on pr.role_id = ru.role_id\n join permissions p on p.id = pr.permission_id\nwhere team_id = 495 and p.name IN ('dial');\n\nselect * from teams where id = 145;\nselect * from crm_configurations where id = 129;\nselect * from social_accounts where sociable_id = 2317;\nSELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;\n\nselect * from teams where id = 1;\nSELECT * FROM crm_layouts WHERE crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;\nSELECT * FROM crm_layout_entities WHERE id = 5507;\nSELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');\n\nselect * from teams;\nselect * from activities where crm_configuration_id = 14;\n\nSELECT * FROM social_accounts where provider = 'copper';\n\nselect * from activities where id = 628467;\nselect * from participants where activity_id = 628467;\n\nSELECT * FROM contacts WHERE id = 3969;\nSELECT * FROM accounts WHERE id = 177;\n\nSELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;\n\n# ********************* BH\nselect * from teams where id = 36;\nSELECT * FROM crm_configurations WHERE id = 21;\nselect * from activities where crm_configuration_id = 21 and id = 607901;\nselect * from activities where crm_configuration_id = 21;\n\nselect * roles;\nselect * from permissions;\nselect * from permission_role where permission_id = 226;\n\nselect * from migrations order by id desc;\n\n# mercury\n# neptune\n# earth\n\nselect * from teams;\nselect * from teams where id = 19;\nselect * from teams where id = 27;\nselect * from users where team_id = 27;\nSELECT * FROM crm_configurations WHERE id = 42;\n\nselect * from social_accounts sa\njoin users u on sa.sociable_id = u.id\nwhere u.team_id = 19\nand sa.provider = 'pipedrive';\n\nselect * from activities where id = 631461;\nSELECT * FROM crm_field_values WHERE crm_field_id = 180;\n\nselect * from teams where id = 2;\nSELECT * FROM social_accounts WHERE sociable_id = 89;\n\nSELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273\nselect * from activity_summary_logs where activity_id = 634273;\n\nselect * from sidekick_settings where team_id = 2;\n\nselect * from teams; # 2, 2\nSELECT * FROM crm_configurations WHERE team_id = 2; # 2\nselect * from team_features where team_id = 2;\nselect * from features;\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';\nSELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;\n\nselect * from automated_reports order by id desc;\nselect * from automated_report_results order by id desc;\nselect * from users where team_id = 1 and id IN (7160, 3248);\nselect * from migrations order by id desc;\n\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 1 and sa.provider = 'salesforce';\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 565;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 175;\nselect * from playbook_categories where playbook_id = 175;\nselect * from users where team_id = 1;\nselect * from users where id = 7160;\nselect * from crm_profiles where user_id = 7160;\nselect * from features;\nselect\n *\n# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,\n# crm_configuration_id, crm_provider_id, transcription_id, status\nfrom activities where crm_configuration_id = 1 and type = 'conference'\n# and crm_provider_id IS NOT NULL\nand provider != 'uploader' and actual_start_time IS NOT NULL\nORDER by id desc;\nselect * from activities where id = 54747783; # 00UO400000pCzojMAC\n\nselect p.id, p.activity_type, pc.id, pc.name\nFROM playbooks p\njoin playbook_categories pc on p.id = pc.playbook_id\nwhere p.team_id = 1 and p.activity_type = 'event';\n\nSELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';\nSELECT * FROM crm_field_values WHERE crm_field_id = 4;\n\nselect * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id\nwhere crm_configuration_id = 1 and pl.playbook_id = 175;\n\nselect * from teams;\nSELECT r.* FROM automated_reports r\njoin teams t on r.team_id = t.id\nWHERE r.frequency = 'daily'\n and r.status = 1\nAND t.status = 'active'\nAND (r.expires_at >= now() OR r.expires_at IS NULL);\n\nselect * from automated_report_results where report_id IN (18, 33);\n\nselect * from activity_searches where id = 10932;\nselect * from activity_search_filters where activity_search_id = 10932;\nselect * from automated_reports order by id desc;\nselect * from automated_report_results where report_id IN (36);","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.5179688,"top":0.13055556,"width":0.009375,"height":0.013194445},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.5292969,"top":0.12916666,"width":0.00859375,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.5378906,"top":0.12916666,"width":0.008203125,"height":0.015972223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Http\\Controllers\\Webhook;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Contracts\\Events\\Dispatcher as EventDispatcher;\nuse Illuminate\\Http\\JsonResponse;\nuse Illuminate\\Http\\Request;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Http\\Controllers\\AbstractController;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportJob;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsCallbackService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass ReportController extends AbstractController\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[Report Ready]';\n\n public function __construct(\n private readonly AutomatedReportsService $automatedReportsService,\n private readonly BusDispatcher $dispatcher,\n private readonly LoggerInterface $logger,\n private readonly AutomatedReportsCallbackService $callbackService,\n private readonly EventDispatcher $eventDispatcher,\n ) {\n }\n\n public function ready(Request $request): JsonResponse\n {\n $payload = $request->all();\n $now = Carbon::now();\n\n $this->logger->info(self::LOG_PREFIX . ' Webhook received', [\n 'payload' => $payload,\n ]);\n\n // validate\n $reportUuid = $this->callbackService->getResultUuid($payload);\n if (empty($reportUuid)) {\n return response()->json(['status' => 'error', 'message' => 'Request ID is empty'], status: 400);\n }\n\n try {\n $report = $this->automatedReportsService->getReportResult($reportUuid);\n\n // validate\n if ($this->callbackService->isProcessed($report)) {\n $this->logger->warning(self::LOG_PREFIX . ' Report has been already processed', [\n 'uuid' => $reportUuid,\n 'currentStatus' => $report->getStatusLabel(),\n ]);\n\n return response()->json(['status' => 'already_processed']);\n }\n\n // always try to get a child podcast cause report configuration cannot be trusted\n $reportPodcast = $this->automatedReportsService->findChildResult(\n result: $report,\n type: AutomatedReportsService::MEDIA_TYPE_PODCAST\n );\n\n // update results\n $report->update([\n 'status' => $this->callbackService->getPrimaryStatus($report, $payload),\n 'response' => $payload,\n 'generated_at' => $now,\n ]);\n // if a podcast is set, update it\n $reportPodcast?->update([\n 'status' => $this->callbackService->getPodcastStatus($payload),\n 'response' => $payload,\n 'generated_at' => $now,\n ]);\n\n $this->logger->info(self::LOG_PREFIX . ' Report has been processed', [\n 'uuid' => $reportUuid,\n 'child_uuid' => $reportPodcast?->getUuid(),\n ]);\n\n if (! $this->callbackService->isSuccess($payload)) {\n $this->logger->warning(self::LOG_PREFIX . ' Error creating report', $payload);\n\n return response()->json(['status' => 'ok']);\n }\n\n // If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)\n if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {\n // send the primary report\n $this->dispatcher->dispatch(new SendReportJob($reportUuid));\n\n // send the podcast report if it set and generated\n if ($reportPodcast && $reportPodcast->getStatus() === AutomatedReportResult::STATUS_GENERATED) {\n $this->dispatcher->dispatch(new SendReportJob(reportUuid: $reportPodcast->getUuid()));\n }\n }\n\n // Track Datadog metrics for automated reports\n $automatedReport = $report->getReport();\n $this->callbackService->pushToDatadog($automatedReport, $report);\n\n if ($reportPodcast) {\n $this->callbackService->pushToDatadog($automatedReport, $reportPodcast);\n }\n\n $this->eventDispatcher->dispatch(new AutomatedReportGenerated($automatedReport, $report));\n } catch (ModelNotFoundException $exception) {\n $this->logger->error(self::LOG_PREFIX . ' Report not found', [\n 'uuid' => $reportUuid,\n 'error' => $exception->getMessage(),\n ]);\n\n return response()->json(['status' => 'error', 'message' => 'Report not found'], status: 404);\n } catch (Throwable $exception) {\n $this->logger->error(self::LOG_PREFIX . ' Failed to update report status', [\n 'uuid' => $reportUuid,\n 'error' => $exception->getMessage(),\n ]);\n\n return response()->json(['status' => 'error', 'message' => 'Failed to update report status'], status: 500);\n }\n\n return response()->json(['status' => 'ok']);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Http\\Controllers\\Webhook;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcher;\nuse Illuminate\\Contracts\\Events\\Dispatcher as EventDispatcher;\nuse Illuminate\\Http\\JsonResponse;\nuse Illuminate\\Http\\Request;\nuse Jiminny\\Events\\AutomatedReports\\AutomatedReportGenerated;\nuse Jiminny\\Exceptions\\ModelNotFoundException;\nuse Jiminny\\Http\\Controllers\\AbstractController;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportJob;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsCallbackService;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Psr\\Log\\LoggerInterface;\nuse Throwable;\n\nclass ReportController extends AbstractController\n{\n /**\n * Log prefix for all log messages\n */\n private const string LOG_PREFIX = '[Report Ready]';\n\n public function __construct(\n private readonly AutomatedReportsService $automatedReportsService,\n private readonly BusDispatcher $dispatcher,\n private readonly LoggerInterface $logger,\n private readonly AutomatedReportsCallbackService $callbackService,\n private readonly EventDispatcher $eventDispatcher,\n ) {\n }\n\n public function ready(Request $request): JsonResponse\n {\n $payload = $request->all();\n $now = Carbon::now();\n\n $this->logger->info(self::LOG_PREFIX . ' Webhook received', [\n 'payload' => $payload,\n ]);\n\n // validate\n $reportUuid = $this->callbackService->getResultUuid($payload);\n if (empty($reportUuid)) {\n return response()->json(['status' => 'error', 'message' => 'Request ID is empty'], status: 400);\n }\n\n try {\n $report = $this->automatedReportsService->getReportResult($reportUuid);\n\n // validate\n if ($this->callbackService->isProcessed($report)) {\n $this->logger->warning(self::LOG_PREFIX . ' Report has been already processed', [\n 'uuid' => $reportUuid,\n 'currentStatus' => $report->getStatusLabel(),\n ]);\n\n return response()->json(['status' => 'already_processed']);\n }\n\n // always try to get a child podcast cause report configuration cannot be trusted\n $reportPodcast = $this->automatedReportsService->findChildResult(\n result: $report,\n type: AutomatedReportsService::MEDIA_TYPE_PODCAST\n );\n\n // update results\n $report->update([\n 'status' => $this->callbackService->getPrimaryStatus($report, $payload),\n 'response' => $payload,\n 'generated_at' => $now,\n ]);\n // if a podcast is set, update it\n $reportPodcast?->update([\n 'status' => $this->callbackService->getPodcastStatus($payload),\n 'response' => $payload,\n 'generated_at' => $now,\n ]);\n\n $this->logger->info(self::LOG_PREFIX . ' Report has been processed', [\n 'uuid' => $reportUuid,\n 'child_uuid' => $reportPodcast?->getUuid(),\n ]);\n\n if (! $this->callbackService->isSuccess($payload)) {\n $this->logger->warning(self::LOG_PREFIX . ' Error creating report', $payload);\n\n return response()->json(['status' => 'ok']);\n }\n\n // If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)\n if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {\n // send the primary report\n $this->dispatcher->dispatch(new SendReportJob($reportUuid));\n\n // send the podcast report if it set and generated\n if ($reportPodcast && $reportPodcast->getStatus() === AutomatedReportResult::STATUS_GENERATED) {\n $this->dispatcher->dispatch(new SendReportJob(reportUuid: $reportPodcast->getUuid()));\n }\n }\n\n // Track Datadog metrics for automated reports\n $automatedReport = $report->getReport();\n $this->callbackService->pushToDatadog($automatedReport, $report);\n\n if ($reportPodcast) {\n $this->callbackService->pushToDatadog($automatedReport, $reportPodcast);\n }\n\n $this->eventDispatcher->dispatch(new AutomatedReportGenerated($automatedReport, $report));\n } catch (ModelNotFoundException $exception) {\n $this->logger->error(self::LOG_PREFIX . ' Report not found', [\n 'uuid' => $reportUuid,\n 'error' => $exception->getMessage(),\n ]);\n\n return response()->json(['status' => 'error', 'message' => 'Report not found'], status: 404);\n } catch (Throwable $exception) {\n $this->logger->error(self::LOG_PREFIX . ' Failed to update report status', [\n 'uuid' => $reportUuid,\n 'error' => $exception->getMessage(),\n ]);\n\n return response()->json(['status' => 'error', 'message' => 'Failed to update report status'], status: 500);\n }\n\n return response()->json(['status' => 'ok']);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.0140625,"top":0.041666668,"width":0.028515626,"height":0.021527778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-8011625077326189080
|
6686649160176153677
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
16
14
13
Previous Highlighted Error
Next Highlighted Error
SELECT * FROM teams WHERE id = 1;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 283;
SELECT * FROM crm_fields WHERE id = 2234;
SELECT * FROM crm_field_values WHERE crm_field_id = 2234;
select * from crm_profiles where user_id = 143;
select * from record_types where crm_configuration_id = 39; # 0121K000001MHElQAO,0121K000001MHEqQAO
select * from business_processes where crm_configuration_id = 39;
# 01941000000H669AAC, 01941000000H66JAAS
select * from record_type_field_values
where record_type_id IN (24);
select * from crm_field_values where id IN (2730);
select * from crm_configurations where id = 39;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce'; #1035
select * from users where team_id = 1; # 222 group 3
SELECT * FROM activities WHERE user_id = 222 order by id desc;
select * from sidekick_settings where team_id = 1;
select * from teams where id = 1;
select * from team_features where team_id = 1;
select * from activities where crm_configuration_id = 2
and provider = 'ms-teams' and id = 608765;
SELECT * FROM activities WHERE crm_configuration_id = 2 and crm_provider_id = '59523413338';
select * from sidekick_settings where team_id = 2;
SELECT * FROM activities WHERE id = 608660;
select * from activity_summary_logs where activity_id = 608660;
select * from ai_prompts where transcription_id = 11214;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('ed78a437-2804-450e-ab2f-56ab1c641346') = uuid;
# id: 608818, crm: 59628809737
SELECT * FROM activities WHERE uuid_to_bin('36b06e55-afdd-4782-8dee-c624cd0af191') = uuid;
# id: 608821, crm: 59632069252
SELECT ce.start_time, ce.end_time, a.id, a.uuid, crm_provider_id, calendar_event_id, title,
playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id,
scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, a.created_at
FROM activities a
join calendar_events ce on a.calendar_event_id = ce.id
WHERE a.id IN (608818, 608821);
select * from users where team_id = 1;
select * from team_settings where team_id = 1;
select * from crm_profiles where crm_configuration_id = 39 order by user_id;
select * from team_features where team_id = 1;
select * from users where team_id = 2;
SELECT * FROM activities WHERE uuid_to_bin('ec7647e9-5225-458b-b475-f31aa2769204') = uuid; # 612639
# Preslava N. Ivanova, grou id 3
SELECT * FROM opportunities WHERE uuid_to_bin('a2928fe5-aec5-46cb-85d9-7654c89e46a6') = uuid;
select * from activities where opportunity_id = 344 and actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00';
select
a.id,
a.type,
a.scheduled_start_time,
a.actual_start_time,
a.created_at,
a.opportunity_id,
a.status
FROM activities a
WHERE opportunity_id = 344
and status IN ('completed', 'received', 'delivered')
and (
(a.actual_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.created_at between '2024-10-11 00:00:00' and '2024-10-12 00:00:00')
OR (a.scheduled_start_time between '2024-10-11 00:00:00' and '2024-10-12 00:00:00'))
;
SELECT * FROM users WHERE id = 222;
SELECT * FROM crm_profiles WHERE user_id = 222;
select * from crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 281;
select * from group_deal_risk_types;
select * from opportunities where team_id = 1;
SELECT * FROM opportunities WHERE id = 315;
SELECT * FROM crm_field_data WHERE object_id = 315;
select * from crm_field_data where object_id = 260;
select * from generic_ai_prompts where subject_id = 315;
select * from teams; # 36, 21, 121, [EMAIL]
SELECT * FROM social_accounts WHERE sociable_id = 121 and provider = 'bullhorn';
# [PASSWORD_DOTS]
select * from teams where id = 1;
select * from crm_configurations where id = 39;
select * from users where team_id = 1;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 1;
# 1 - 00541000004281rAAA
# 204 - 0052g000003freeAAA
# 429 - 0052g000003qGOiAAM
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
select * from activities where type = 'softphone'
and created_at > '2024-12-11 15:24:36' order by id desc;
select * from activity_providers where team_id = 1;
select * from activity_provider_users where activity_provider_id = 328;
select * from opportunities where crm_configuration_id = 39
AND account_id = 178 AND is_closed = false
order by created_at DESC;
select * from contacts where id = 3952;
select * from accounts where id = 178;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations where id = 21;
select * from users where team_id = 36;
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 36
and sa.provider = 'bullhorn';
select * from social_accounts where id = 348;
UPDATE social_accounts SET
provider_user_token = '21442_6802599_91:41179a58-21e7-4d7c-ad58-56bb666b2f65',
provider_refresh_token = '21442_6802599_91:01c6b335-3f2a-42e4-85ff-8a08fa65fceb',
expires = 1733998131,
state = 'connected'
WHERE id = 348;
# [PASSWORD_DOTS]
select * from teams where id = 31;
select * from crm_configurations where id = 18;
select * from users where team_id = 31; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 31;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 31
and sa.provider = 'close';
select * from contacts where crm_configuration_id = 18;
# [PASSWORD_DOTS] NEPTUNE [PASSWORD_DOTS]
select * from teams;
select * from users where id IN (1030, 1035, 1052);
select * from crm_configurations;
select * from users where team_id = 65; # 257
select * from team_settings where team_id = 65; # 257
select * from invitations where team_id = 65; # 257
select * from users where email = '[EMAIL]'; # 257
select u.email, cp.* from users u
join crm_profiles cp on u.id = cp.user_id
where u.team_id = 65;
select * from crm_configurations where id = 53;
select * from accounts where crm_configuration_id = 53 order by id desc;
select * from leads where crm_configuration_id = 53 order by id desc;
select * from contacts where crm_configuration_id = 53 order by id desc;
select * from opportunities where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 53 order by id desc;
select * from crm_fields where crm_configuration_id = 53 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 53 order by id desc;
select * from stages where crm_configuration_id = 53 order by id desc;
select * from crm_profiles where crm_configuration_id = 13;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
and sa.provider = 'integration-app';
select * from contacts where crm_configuration_id = 13;
select * from social_accounts where sociable_id = 283;
SELECT * FROM opportunities WHERE crm_provider_id = '006O400000E9bzeIAB';
select * from activity_providers where team_id = 65;
SELECT * FROM activities WHERE crm_configuration_id IN (51, 52, 53);
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 65
;
# [PASSWORD_DOTS] STAGING [PASSWORD_DOTS]
SELECT * FROM teams;
SELECT * FROM teams WHERE id = 88;
SELECT * FROM teams WHERE id = 89;
select * from team_settings where team_id = 89;
SELECT * FROM users WHERE team_id = 89;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 89;
select * from users;
SELECT * FROM social_accounts WHERE sociable_id = 1761;
SELECT * FROM crm_configurations WHERE id = 70;
select * from accounts where crm_configuration_id = 70 order by id desc;
select * from leads where crm_configuration_id = 70 order by id desc;
select * from contacts where crm_configuration_id = 70 order by id desc;
select * from opportunities where crm_configuration_id = 70 order by id desc;
select * from crm_profiles where crm_configuration_id = 70 order by id desc;
select * from crm_fields where crm_configuration_id = 70 order by id desc;
select * from crm_field_values where crm_field_id = 3536 order by id desc;
select * from crm_layouts where crm_configuration_id = 70 order by id desc;
select * from stages where crm_configuration_id = 70 order by id desc;
select * from business_processes where crm_configuration_id = 70 order by id desc;
select * from business_process_stages where business_process_id = 34;
select * from contacts where id = 10468;
select * from crm_layouts where crm_configuration_id = 70;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 388;
SELECT * FROM crm_fields WHERE id IN (3533,3534,3535);
select * from activities where crm_configuration_id = 70
and (account_id IS NOT NULL or lead_id IS NOT NULL or contact_id IS NOT NULL or opportunity_id IS NOT NULL) order by id desc;
SELECT * FROM activities WHERE uuid_to_bin('2e10b60f-8a61-41c5-a3d4-28835353dc65') = uuid;
SELECT * FROM activities where crm_configuration_id = 69 ;
SELECT * FROM users WHERE email LIKE '%[EMAIL]%';
SELECT * FROM activities WHERE uuid_to_bin('5a150c93-40fc-42ec-b3bd-c1d328e09f6e') = uuid;
SELECT * FROM opportunities WHERE id = 385;
select * from participants p
join activities a on p.activity_id = a.id
where a.crm_configuration_id = 70
and (p.lead_id IS NOT NULL or p.contact_id IS NOT NULL);
SELECT * FROM participants WHERE id = 1013638;
select * from teams where id = 90;
select * from users where team_id = 90;
select * from social_accounts where social_accounts.sociable_id IN (1960,1760);
SELECT * FROM crm_profiles WHERE crm_configuration_id = 71;
select * from invitations where team_id = 90;
select * from crm_configurations where id = 71;
select * from accounts where crm_configuration_id = 71 order by id desc;
select * from leads where crm_configuration_id = 71 order by id desc;
select * from contacts where crm_configuration_id = 71 order by id desc;
select * from opportunities where crm_configuration_id = 71 order by id desc;
select * from crm_profiles where crm_configuration_id = 71 order by id desc;
select * from crm_fields where crm_configuration_id = 71 order by id desc;
select * from crm_field_values where crm_field_id = 3341 order by id desc;
select * from crm_layouts where crm_configuration_id = 71 order by id desc;
select * from stages where crm_configuration_id = 71 order by id desc;
select * from users order by secondary_email desc;
select u.id, u.email, u.status, sa.id, sa.provider_user_id from social_accounts sa
join users u on sa.sociable_id = u.id
where sa.provider = 'google' and u.email LIKE 'aneliya%';
select * from failed_jobs order by id desc;
select * from users where email = '[EMAIL]' or secondary_email = '[EMAIL]';
select * from teams;
SELECT * FROM crm_profiles WHERE crm_configuration_id = 39;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type = 'task';
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 1
and sa.provider = 'salesforce';
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('c38b3895-fd0f-4b1f-9fb2-c170dba137c6') = uuid;
SELECT * FROM crm_configurations WHERE id = 70;
select * from teams where id = 1;
select * from groups where team_id = 1;
select * from users where team_id = 1;
select o.id, o.name,o.close_date, u.id, u.name, u.group_id, r.id, r.display_name, g.name, g.scope from opportunities o
join users u on o.user_id = u.id
join groups g on u.group_id = g.id
join role_user ru on u.id = ru.user_id
join roles r on ru.role_id = r.id
where o.crm_configuration_id = 39 and close_date > '2024-01-01 00:00:00';
select * from role_user where user_id = 143;
select * from roles;
select * from role_user;
select * from groups where id = 9;
select * from scope_groups where group_id = 9;
# [PASSWORD_DOTS]
select * from teams where id = 36;
select * from crm_configurations;
SELECT * FROM social_accounts WHERE sociable_id = 121;
https://crmsandbox.zoho.com/crm/jiminnyw4/tab/Leads/4776201000005049105
https://crmsandbox.zoho.com/crm/
https://crm.zoho.com/crm/org3469620/tab/Leads/230045000229559080
https://crm.zoho.com/crm/
org3469620
SELECT * FROM activities WHERE uuid_to_bin('03382d20-c8bc-48e7-a3d4-90b52fa5ceab') = uuid;
select * from users where email LIKE "%mobile_automation_%";
select * from social_accounts where sociable_id IN (2228);
select * from crm_profiles where user_id IN (2222,2223,2226,2227);
select * from teams order by id desc;
SELECT * FROM users WHERE id = 2229;
SELECT * FROM crm_profiles WHERE user_id = 2229;
select * from opportunities where crm_configuration_id = 88;
select * from crm_fields where crm_configuration_id = 88;
select * from crm_profiles where crm_configuration_id = 88;
SELECT * FROM teams WHERE id = 1;
SELECT * FROM users WHERE id = 143;
SELECT * FROM users WHERE uuid_to_bin('fde193d3-06a2-4e1a-8895-62b94039215d') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73385071-a756-42ae-9c73-8b53f2309467') = uuid;
https://app.staging.jiminny.com/ondemand?
min_duration=1
&
only_recorded=1
&
user_id%5B%5D=641f1acb-16b8-42d1-8726-df52979dad0e
&
sequence_number=2
select * from users where team_id = 1 and email like '%stoyan%'
select * from coaching_feedbacks;
select * from teams;
SELECT * FROM users WHERE team_id = 36;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from users where id = 143;
SELECT * FROM users WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM teams WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
SELECT * FROM activity_shares WHERE uuid_to_bin('73180eeb-33de-4065-977d-ccbe0e6c94fc') = uuid;
select * from users where team_id = 2;
select * from activities where crm_configuration_id = 39
and activities.scheduled_start_time BETWEEN '2025-04-09 00:00:00' AND '2025-04-09 23:59:59'
AND user_id = 143
order by id desc;
# [PASSWORD_DOTS]
select * from teams where id = 142; # 2312, 126
select * from team_settings;
select * from users where team_id = 142; # 21642
SELECT * FROM social_accounts WHERE sociable_id = 21642;
SELECT * FROM crm_profiles cp join users u ON u.id = cp.user_id WHERE team_id = 142;
select * from crm_profiles where id IN (93);
select * from invitations;
select * from team_features where team_id = 1;
SELECT * FROM crm_configurations WHERE id = 126;
select * from accounts where crm_configuration_id = 126 order by id desc;
select * from leads where crm_configuration_id = 126 order by id desc;
select * from contacts where crm_configuration_id = 126 order by id desc;
select * from opportunities where crm_configuration_id = 126 order by id desc;
select * from crm_profiles where crm_configuration_id = 126 order by id desc;
select * from crm_fields where crm_configuration_id = 126 # 11060
# and type IN ('picklist', 'status')
# and object_type = 'task'
order by id desc;
# 5731,5732,5733
select DISTINCT crm_field_id from crm_field_values where crm_field_id IN (11151,12239,12215,12185,12175,12165,12144,12137,12127,12109,12107,12105,12103,12092,12037,12005,12003,11987,11969,11958,11951,11942,11931,11924,11921,11917,11915,11901,11893,11883,11872,11870,11868,11866,11839,11833,11821,11793,11780,11777,11769,11757,11737,11735,11656,11645,11638,11629,11618,11611,11602,11591,11584,11581,11558,11544,11543,11534,11532,11529,11527,11503,11497,11493,11488,11470,11468,11457,11455,11397,11387,11372,11363,11348,11323,11318,11309,11301,11300,11292,11290,11286,11284,11256,11252,11242,11237,11233,11219,11176,11160) order by id desc;
select * from crm_layouts where crm_configuration_id = 126 order by id desc;
SELECT * FROM crm_layout_entities WHERE crm_layout_id in (300,299,298);
select * from stages where crm_configuration_id = 126 order by id desc;
select * from business_processes where crm_configuration_id = 126 order by id desc;
select * from business_process_stages where business_process_id IN (76,75,74,73);
select * from playbooks where team_id = 142;
select * from playbook_layouts where playbook_id IN (108);
SELECT * FROM playbook_categories WHERE playbook_id IN (108);
select * from teams where id = 130;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 2
and sa.provider = 'hubspot';
SELECT * FROM activities
WHERE crm_configuration_id = 110;
select * from teams;
select * from crm_configurations;
SELECT * FROM activities WHERE id = 628773;
SELECT * FROM crm_profiles WHERE user_id = 1460;
SELECT * FROM social_accounts WHERE sociable_id = 2291;
select * from teams;
select ru.*, pr.*, p.* from users u join role_user ru on ru.user_id = u.id
join permission_role pr on pr.role_id = ru.role_id
join permissions p on p.id = pr.permission_id
where team_id = 495 and p.name IN ('dial');
select * from teams where id = 145;
select * from crm_configurations where id = 129;
select * from social_accounts where sociable_id = 2317;
SELECT * FROM activities WHERE uuid_to_bin('8dbab184-a333-4268-ad57-fb41f8d53a9a') = uuid;
select * from teams where id = 1;
SELECT * FROM crm_layouts WHERE crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 280;
SELECT * FROM crm_layout_entities WHERE id = 5507;
SELECT * FROM crm_fields WHERE crm_configuration_id = 39 and object_type IN ('event');
select * from teams;
select * from activities where crm_configuration_id = 14;
SELECT * FROM social_accounts where provider = 'copper';
select * from activities where id = 628467;
select * from participants where activity_id = 628467;
SELECT * FROM contacts WHERE id = 3969;
SELECT * FROM accounts WHERE id = 177;
SELECT * FROM activities WHERE uuid_to_bin('4eb54c77-cfa3-2bd4-84a7-9ed46a21c988') = uuid;
# [PASSWORD_DOTS] BH
select * from teams where id = 36;
SELECT * FROM crm_configurations WHERE id = 21;
select * from activities where crm_configuration_id = 21 and id = 607901;
select * from activities where crm_configuration_id = 21;
select * roles;
select * from permissions;
select * from permission_role where permission_id = 226;
select * from migrations order by id desc;
# mercury
# neptune
# earth
select * from teams;
select * from teams where id = 19;
select * from teams where id = 27;
select * from users where team_id = 27;
SELECT * FROM crm_configurations WHERE id = 42;
select * from social_accounts sa
join users u on sa.sociable_id = u.id
where u.team_id = 19
and sa.provider = 'pipedrive';
select * from activities where id = 631461;
SELECT * FROM crm_field_values WHERE crm_field_id = 180;
select * from teams where id = 2;
SELECT * FROM social_accounts WHERE sociable_id = 89;
SELECT * FROM activities WHERE uuid_to_bin('ba0c029a-bc14-4e17-8603-64174acebcbb') = uuid; # 634273
select * from activity_summary_logs where activity_id = 634273;
select * from sidekick_settings where team_id = 2;
select * from teams; # 2, 2
SELECT * FROM crm_configurations WHERE team_id = 2; # 2
select * from team_features where team_id = 2;
select * from features;
SELECT * FROM opportunities WHERE crm_configuration_id = 2 and crm_provider_id = '51317301383';
SELECT * FROM opportunities WHERE crm_configuration_id = 2 order by id desc;
select * from automated_reports order by id desc;
select * from automated_report_results order by id desc;
select * from users where team_id = 1 and id IN (7160, 3248);
select * from migrations order by 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 = 1 and sa.provider = 'salesforce';
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 565;
select * from playbooks where team_id = 1;
select * from playbooks where id = 175;
select * from playbook_categories where playbook_id = 175;
select * from users where team_id = 1;
select * from users where id = 7160;
select * from crm_profiles where user_id = 7160;
select * from features;
select
*
# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,
# crm_configuration_id, crm_provider_id, transcription_id, status
from activities where crm_configuration_id = 1 and type = 'conference'
# and crm_provider_id IS NOT NULL
and provider != 'uploader' and actual_start_time IS NOT NULL
ORDER by id desc;
select * from activities where id = 54747783; # 00UO400000pCzojMAC
select p.id, p.activity_type, pc.id, pc.name
FROM playbooks p
join playbook_categories pc on p.id = pc.playbook_id
where p.team_id = 1 and p.activity_type = 'event';
SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';
SELECT * FROM crm_field_values WHERE crm_field_id = 4;
select * from crm_layouts cl join playbook_layouts pl on cl.id = pl.layout_id
where crm_configuration_id = 1 and pl.playbook_id = 175;
select * from teams;
SELECT r.* FROM automated_reports r
join teams t on r.team_id = t.id
WHERE r.frequency = 'daily'
and r.status = 1
AND t.status = 'active'
AND (r.expires_at >= now() OR r.expires_at IS NULL);
select * from automated_report_results where report_id IN (18, 33);
select * from activity_searches where id = 10932;
select * from activity_search_filters where activity_search_id = 10932;
select * from automated_reports order by id desc;
select * from automated_report_results where report_id IN (36);
Sync Changes
Hide This Notification
Code changed:
Hide
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Http\Controllers\Webhook;
use Carbon\Carbon;
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Jiminny\Events\AutomatedReports\AutomatedReportGenerated;
use Jiminny\Exceptions\ModelNotFoundException;
use Jiminny\Http\Controllers\AbstractController;
use Jiminny\Jobs\AutomatedReports\SendReportJob;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsCallbackService;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Psr\Log\LoggerInterface;
use Throwable;
class ReportController extends AbstractController
{
/**
* Log prefix for all log messages
*/
private const string LOG_PREFIX = '[Report Ready]';
public function __construct(
private readonly AutomatedReportsService $automatedReportsService,
private readonly BusDispatcher $dispatcher,
private readonly LoggerInterface $logger,
private readonly AutomatedReportsCallbackService $callbackService,
private readonly EventDispatcher $eventDispatcher,
) {
}
public function ready(Request $request): JsonResponse
{
$payload = $request->all();
$now = Carbon::now();
$this->logger->info(self::LOG_PREFIX . ' Webhook received', [
'payload' => $payload,
]);
// validate
$reportUuid = $this->callbackService->getResultUuid($payload);
if (empty($reportUuid)) {
return response()->json(['status' => 'error', 'message' => 'Request ID is empty'], status: 400);
}
try {
$report = $this->automatedReportsService->getReportResult($reportUuid);
// validate
if ($this->callbackService->isProcessed($report)) {
$this->logger->warning(self::LOG_PREFIX . ' Report has been already processed', [
'uuid' => $reportUuid,
'currentStatus' => $report->getStatusLabel(),
]);
return response()->json(['status' => 'already_processed']);
}
// always try to get a child podcast cause report configuration cannot be trusted
$reportPodcast = $this->automatedReportsService->findChildResult(
result: $report,
type: AutomatedReportsService::MEDIA_TYPE_PODCAST
);
// update results
$report->update([
'status' => $this->callbackService->getPrimaryStatus($report, $payload),
'response' => $payload,
'generated_at' => $now,
]);
// if a podcast is set, update it
$reportPodcast?->update([
'status' => $this->callbackService->getPodcastStatus($payload),
'response' => $payload,
'generated_at' => $now,
]);
$this->logger->info(self::LOG_PREFIX . ' Report has been processed', [
'uuid' => $reportUuid,
'child_uuid' => $reportPodcast?->getUuid(),
]);
if (! $this->callbackService->isSuccess($payload)) {
$this->logger->warning(self::LOG_PREFIX . ' Error creating report', $payload);
return response()->json(['status' => 'ok']);
}
// If one-off, send the report immediately, if not leave it for the scheduler (automated-reports:send)
if ($report->getReport()->getFrequency() === AutomatedReportsService::FREQUENCY_ONE_OFF) {
// send the primary report
$this->dispatcher->dispatch(new SendReportJob($reportUuid));
// send the podcast report if it set and generated
if ($reportPodcast && $reportPodcast->getStatus() === AutomatedReportResult::STATUS_GENERATED) {
$this->dispatcher->dispatch(new SendReportJob(reportUuid: $reportPodcast->getUuid()));
}
}
// Track Datadog metrics for automated reports
$automatedReport = $report->getReport();
$this->callbackService->pushToDatadog($automatedReport, $report);
if ($reportPodcast) {
$this->callbackService->pushToDatadog($automatedReport, $reportPodcast);
}
$this->eventDispatcher->dispatch(new AutomatedReportGenerated($automatedReport, $report));
} catch (ModelNotFoundException $exception) {
$this->logger->error(self::LOG_PREFIX . ' Report not found', [
'uuid' => $reportUuid,
'error' => $exception->getMessage(),
]);
return response()->json(['status' => 'error', 'message' => 'Report not found'], status: 404);
} catch (Throwable $exception) {
$this->logger->error(self::LOG_PREFIX . ' Failed to update report status', [
'uuid' => $reportUuid,
'error' => $exception->getMessage(),
]);
return response()->json(['status' => 'error', 'message' => 'Failed to update report status'], status: 500);
}
return response()->json(['status' => 'ok']);
}
}
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
12578
|
270
|
0
|
2026-04-14T11:25:58.272246+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776165958272_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2Shell|EditViewSessionScriptsProfilesWindowHe iTerm2Shell|EditViewSessionScriptsProfilesWindowHelplalol• Support Daily • in 35 mA100% CTue 14 Apr 14:25:58ec2-user@ip-10-30-93-249:~181DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-...84-zsh|885-zsh86-zsh0 87* Unable to acce...-88[2026-04-1410:46:087staging. INFO:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}"teamId" :1, "frequency":"[2026-04-14 10:46:08] staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88", "trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-1410:48:42]staging.INF0: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth" : true}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]aa52627fc27"}staging.INFO: [automated-reports]Processing daily reports{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports]Automated report found Test 6[2026-04-1410:48:42]staging. INFO: [automated-reports]Found 1 daily reports to process9-b635-2aa52627f c27"}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e9[2026-04-14 10:48:42] staging.INF0: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8".,"teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"})[2026-04-14 10:48:42] staging.INFO: [automated-reports]Completed{"correlation_id":"246ala1a-7076-458c-bd7d-49d2f5a2db88", "trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@b79a4bdd6905:/home/jiminny# phpartisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id" : "8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[automated-reports] Automated report found Tuesday report[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 dailyreports to process5-acd0-86c51b5659a5"}{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-447[2026-04-14 11:22:33]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId" :1, "frequency": "daily", "type": "ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b"|',"trace_id": "8e05a574-88d0-4475-acd0-86c51b5659a5"})[2026-04-14 11:22:33] staging.INFO: [automated-reports]Completed{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"})root@b79a4bdd6905:/home/jiminny#l...
|
NULL
|
1042248493853748926
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2Shell|EditViewSessionScriptsProfilesWindowHe iTerm2Shell|EditViewSessionScriptsProfilesWindowHelplalol• Support Daily • in 35 mA100% CTue 14 Apr 14:25:58ec2-user@ip-10-30-93-249:~181DOCKER981DEV (docker)882APP (-zsh)83ec2-user@ip-10-30-...84-zsh|885-zsh86-zsh0 87* Unable to acce...-88[2026-04-1410:46:087staging. INFO:[automated-reports]DispatchingGenerate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8"daily", "type": "ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"'}"teamId" :1, "frequency":"[2026-04-14 10:46:08] staging.INFO: [automated-reports]Completed{"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0", "trace_id":"185df6f6-4327-4609-9cZe-2ab83a0f5432"}root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88", "trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}[2026-04-1410:48:42]staging.INF0: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth" : true}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88","trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"'}[2026-04-14 10:48:42]aa52627fc27"}staging.INFO: [automated-reports]Processing daily reports{"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e99-b635-2[automated-reports]Automated report found Test 6[2026-04-1410:48:42]staging. INFO: [automated-reports]Found 1 daily reports to process9-b635-2aa52627f c27"}{"correlation_id":"246alala-7076-458c-bd7d-49d2f5a2db88""trace_id":"1f894bf6-e50d-4e9[2026-04-14 10:48:42] staging.INF0: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8".,"teamId" :1, "frequency" :"daily","type": "ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88"',"trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"})[2026-04-14 10:48:42] staging.INFO: [automated-reports]Completed{"correlation_id":"246ala1a-7076-458c-bd7d-49d2f5a2db88", "trace_id" : "1f894bf6-e50d-4e99-b635-2aa52627fc27"}root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"root@b79a4bdd6905:/home/jiminny# phpartisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33]staging.INFO: [automated-reports]Checking conditions {"isMonday":false,"isFirstDay0fMonth":false, "currentMonth":4, "isQuarterlyMonth":true} {"correlation_id": "90a98201-fc6a-45b9-b3bd-2055cfce711b", "trace_id" : "8e05a574-88d0-4475-acd0-86c51b5659a5"}[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}[automated-reports] Automated report found Tuesday report[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 dailyreports to process5-acd0-86c51b5659a5"}{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-447[2026-04-14 11:22:33]staging.INFO: [automated-reports]Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId" :1, "frequency": "daily", "type": "ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b"|',"trace_id": "8e05a574-88d0-4475-acd0-86c51b5659a5"})[2026-04-14 11:22:33] staging.INFO: [automated-reports]Completed{"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"})root@b79a4bdd6905:/home/jiminny#l...
|
NULL
|
|
12688
|
NULL
|
0
|
2026-04-14T11:30:54.828367+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166254828_m1.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny#","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny#","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.004166667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.12291667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.12708333,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.24583334,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.25,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.36875,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.37291667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.49166667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.49583334,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.6145833,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.61875,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.7375,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.7416667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.86041665,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.8645833,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.9548611,"top":0.032222223,"width":0.03888889,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.4298611,"top":0.033333335,"width":0.13958333,"height":0.017777778},"role_description":"text"}]...
|
3789566028108343630
|
-582478137838602285
|
visual_change
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
NULL
|
|
12690
|
NULL
|
0
|
2026-04-14T11:30:56.791840+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166256791_m2.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny#","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny#","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.23320313,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.23554687,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.30234376,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3046875,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.37148437,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3738281,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.440625,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.44296876,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.5097656,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.5121094,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.57890624,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.58125,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.64804685,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.6503906,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.7171875,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.71953124,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.7703125,"top":1.0,"width":0.021875,"height":-0.02013886},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.475,"top":1.0,"width":0.07851563,"height":-0.020833373},"role_description":"text"}]...
|
3789566028108343630
|
-582478137838602285
|
click
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
NULL
|
|
12691
|
272
|
0
|
2026-04-14T11:31:10.531088+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166270531_m1.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
>
DOCKER...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n>","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n>","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6030993844800467927
|
-582478137834407981
|
click
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
>
DOCKER...
|
12688
|
|
12692
|
273
|
0
|
2026-04-14T11:31:10.531018+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166270531_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsSendCommand.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4434561267597224148
|
-7988188602108755006
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
PhpStormNavigatelaraveRefactonWindowFV faVsco.js v• #1894 on .lY-18909-automated-renorts-ask-liminnv vProject v© AutomatedReportsCi© AutomatedReportsRr© AutomatedReportsS:© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpIsackeamsD TracksTranscriptionD TwilioO UsersVocabularyD Zoom© CoachingFeedbacksUpr© Command.php© CreateDatabaseUsers.p(e) Database aoecount.oic DelereoeAcimnorescc Deleress eroverscom® DevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantlssues.p© FlushRolesPermissionsC© GeneratelnternalWebhoGroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.phpImportUsersFromCsvFil© IterateUsersCommand.f© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo(cJminnv okenintocomm© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesComi© RecalculateDealRisksCo© RemoveDeleteMarkersC(e) Remove-YoiredNuddesi© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© SeedActivities.php© SyncActivity.php© ReportController.php© SendReportJob.phpAutomatedReportsCommand.php© AutomatedReportsSendCommand.php>AddLayoutEntities.php• Team.php© AutomatedReportsRepository.phpAutomatedReportsService.php• TrackProviderInstalledEvent.php© CreateActivityLoggedEvent.php© UserPilotActivityListener.php© ActivityLogged.php© AutomatedReportsCallbackService.php(©) RequestGenerateAskJiminnyReportJob.php© RequestGenerateReportJob.php© AutomatedReportResult.phpAutomatedReport.phpclass AutomatedReportsSendCommand extends Command25 Ct2832 GT35 Ct39414546474854555659646667to origin/JY-18909-automated-repor* The name and signature of the console command.* dvar scrino*/protected Ssignature ='automated-reports:send':/*** The console command description.* Ovar stringprocecced pdescripcion = senas aucomaced reporus based on user cimezone:oouc Tuncclon-_construct(onvare reaconly Loccerinuerace nLodder.private readonly AutomatedReportsRepository $reportRepository,private readonly AutomatedReportsService $automatedReportsService,private readonly BusDispatcher $dispatcher,parent::__construct();/*** Execute the console command.* Oreturn int*/public function handle(): int$reportResults = $this->reportRepository->getGeneratedNotSentResults();foreach ($reportResults as $reportResult) {/** @var AutomatedReportResult $reportResult */$validRecipients = $this->automatedReportsService->getValidRecipientUsers($reportResult->getReport());if ($this->automatedReportsService->shouldSendReport($validRecipients, $reportResult->getGeneratedAt())) €$this->logger->info(self::LOG_PREFIX'Dispatching job', I'uuid' => $reportResult->getUuid(),1):$this->dispatcher->dispatch(new SendReportJob($reportResult->getUuid()));return commandallas. • SuccEss.Support Daily • in 29 mAutomatedRenortsCommandTest100% C2Tue 14 Apr 14:31:10A console [PROD]A console (EU]Al console [STAGING] XGajiminny v01 415 ~15= custom.logA HS_local [jiminny@localhost]S21522-5235245255265275285295505335385405424543545549550551552553554556562563564E laravel.logA SF [jiminny@localhost]Tx: AutovPlaygroundvJOIN users u on u.id = sa.sociable idJOIN teams t 1..n‹->1: on t.id = u.team idWHERE U. team_id = 1 and sa.provider = 'salesforce':select * from teams where id = 1;select * fromgroups g JOIN playbooks p 1..n<-›1: on g.playbook_id = p.id where g.team_id = 1;select * from groups where id = 565;select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * fromplaydook_cacegories where playdooK_1d = 175;select * fromusers where team_1d = 1;select x troi users Mere 10 =100.select * from crm_profiles where user_id = 7160;select * from features;select# id, uuid, type, provider, playbook_category_id, user_id, lead_id, contact_id, account_id, opportunity_id, stage_id,# crm_configuration_id, crm_provider_id,transcription_id, statusfrom activities where crm_configuration_id = 1 and type = 'conference'# and crm_provider_id ISNOT NULLand provider 1= 'uploaden' and actual start time TS NOT NULIORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc 1<-›1..n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event';SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = 'event';SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl 1<->1.n: on cl.id = pl.layout_idwhere crm_configuration_id = 1 and pl.playbook_id = 175;select x tron teams.SELECT r.* FROM automated_reports rjoin teams t on r.teamnid = t.idWHERE r. freguency ='daily'and r.status = 1AND t.status ="active'AMIDI(r.expires.at >= now() OR r.expires.at IS NULL):select * trom aucomated_report_results where report 1d IN (1o, 55J1566567568 v569570571572select * from activity searches where id = 10932:select x Trolactivity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_ report_results order by ia desg;select * from automated_report_results where report id IN (36):W Windsurf Teams 51:65 UTF-84 spaces...
|
12690
|
|
12751
|
NULL
|
0
|
2026-04-14T11:35:47.668789+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166547668_m1.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.004166667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.12291667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.12708333,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.24583334,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.25,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.36875,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.37291667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.49166667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.49583334,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.6145833,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.61875,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.7375,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.7416667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.86041665,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.8645833,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.9548611,"top":0.032222223,"width":0.03888889,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.4298611,"top":0.033333335,"width":0.13958333,"height":0.017777778},"role_description":"text"}]...
|
7000309365672198019
|
-5261720347317964283
|
visual_change
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
NULL
|
|
12753
|
NULL
|
0
|
2026-04-14T11:35:51.454386+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166551454_m2.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.23320313,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.23554687,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.30234376,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3046875,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.37148437,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.3738281,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.440625,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.44296876,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.5097656,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.5121094,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.57890624,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.58125,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.64804685,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.6503906,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.7171875,"top":1.0,"width":0.06914063,"height":-0.03680551},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.71953124,"top":1.0,"width":0.00625,"height":-0.039583325},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.7703125,"top":1.0,"width":0.021875,"height":-0.02013886},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.475,"top":1.0,"width":0.07851563,"height":-0.020833373},"role_description":"text"}]...
|
7000309365672198019
|
-5261720347317964283
|
visual_change
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
12752
|
|
12754
|
274
|
0
|
2026-04-14T11:36:18.210931+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166578210_m1.jpg...
|
iTerm2
|
ec2-user@ip-10-30-93-249:~
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","depth":4,"value":"Last login: Sat Apr 11 12:38:35 on ttys007\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg\nWarning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.\n\nA newer release of \"Amazon Linux\" is available.\n Version 2023.10.20260105:\n Version 2023.10.20260120:\n Version 2023.10.20260202:\n Version 2023.10.20260216:\n Version 2023.10.20260302:\n Version 2023.10.20260325:\n Version 2023.10.20260330:\n Version 2023.11.20260406:\n Version 2023.11.20260413:\n Version 2023.8.20250707:\n Version 2023.8.20250715:\n Version 2023.8.20250721:\n Version 2023.8.20250808:\n Version 2023.8.20250818:\n Version 2023.8.20250908:\n Version 2023.8.20250915:\n Version 2023.9.20250929:\n Version 2023.9.20251014:\n Version 2023.9.20251020:\n Version 2023.9.20251027:\n Version 2023.9.20251105:\n Version 2023.9.20251110:\n Version 2023.9.20251117:\n Version 2023.9.20251208:\nRun \"/usr/bin/dnf check-release-update\" for full release and version update info\n , #_\n ~\\_ ####_\n ~~ \\_#####\\\n ~~ \\###|\n ~~ \\#/ ___ Amazon Linux 2023 (ECS Optimized)\n ~~ V~' '->\n ~~~ /\n ~~._. _/\n _/ _/\n _/m/'\n\nFor documentation, visit http://aws.amazon.com/documentation/ecs\n[ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@fee51d2e1f17:/home/jiminny# php artisan about\n\n Environment ...................................................................................................................................... \n Application Name ................................................................................................................. Jiminny Web App \n Laravel Version .......................................................................................................................... 12.54.1 \n PHP Version ............................................................................................................................... 8.3.30 \n Composer Version ............................................................................................................................... - \n Environment .............................................................................................................................. staging \n Debug Mode ................................................................................................................................... OFF \n URL ...................................................................................................................... app.staging.jiminny.com \n Maintenance Mode ............................................................................................................................. OFF \n Timezone ..................................................................................................................................... UTC \n Locale ..................................................................................................................................... en_US \n\n Cache ............................................................................................................................................ \n Config .................................................................................................................................... CACHED \n Events ................................................................................................................................ NOT CACHED \n Routes .................................................................................................................................... CACHED \n Views ..................................................................................................................................... CACHED \n\n Drivers .......................................................................................................................................... \n Broadcasting .............................................................................................................................. pusher \n Cache ...................................................................................................................................... redis \n Database ................................................................................................................................... mysql \n Logs .................................................................................................................................... errorlog \n Mail ......................................................................................................................................... ses \n Queue ........................................................................................................................................ sqs \n Session .................................................................................................................................... redis \n\n Storage .......................................................................................................................................... \n public/storage ........................................................................................................................ NOT LINKED \n\n Sentry ........................................................................................................................................... \n Enabled ...................................................................................................................................... YES \n Environment .............................................................................................................................. staging \n Laravel SDK Version ....................................................................................................................... 4.13.0 \n PHP SDK Version ........................................................................................................................... 4.13.0 \n Release ................................................................................................................................... 869720 \n Sample Rate Errors .......................................................................................................................... 100% \n Sample Rate Performance Monitoring ....................................................................................................... NOT SET \n Sample Rate Profiling .................................................................................................................... NOT SET \n Send Default PII ........................................................................................................................ DISABLED \n\nroot@fee51d2e1f17:/home/jiminny# php artisan automated-reports\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\n[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"4c37ea47-eebd-4122-8c35-9d6b9d707beb\",\"trace_id\":\"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81\"}\n\nroot@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@73b64f5d54a3:/home/jiminny# php artisan automated-reports\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\n[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"c858e03f-62bd-462d-add2-c1e12a4c4cf8\",\"trace_id\":\"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f\"}\n\nroot@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"fa7417aa-538e-49ab-8827-77235637a6f9\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"63e6d70b-b7cb-4dfa-8443-53453e6c4054\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\n[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"5c23e861-2ca9-4f92-9f67-773d6bc80ca0\",\"trace_id\":\"185df6f6-4327-4609-9c2e-2ab83a0f5432\"}\n\nroot@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[automated-reports] Automated report found Test 6\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"7e7846e2-c0ea-4040-88f4-0ae14b66ade8\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\n[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"246a1a1a-7076-458c-bd7d-49d2f5a2db88\",\"trace_id\":\"1f894bf6-e50d-4e99-b635-2aa52627fc27\"}\n\nroot@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format \"{{.ID}}\" --filter \"name=ecs-worker\" | head -1) /bin/bash -c \"cd /home/jiminny && bash\"\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[automated-reports] Automated report found Tuesday report\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"71b8bbf5-23f4-41df-b637-693765e7aa78\",\"teamId\":1,\"frequency\":\"daily\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\n[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {\"correlation_id\":\"90a98201-fc6a-45b9-b3bd-2055cfce711b\",\"trace_id\":\"8e05a574-88d0-4475-acd0-86c51b5659a5\"}\n\nroot@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send\nroot@b79a4bdd6905:/home/jiminny# php artisan tinker\nPsy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman\nNew PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`\n> $repo = app(AutomatedReportsRepository::class);\n[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\\Repositories\\AutomatedReportsRepository' for this Tinker session.\n= Jiminny\\Repositories\\AutomatedReportsRepository {#15215}\n\n> $repo->getGeneratedNotSentResults();\n= Illuminate\\Database\\Eloquent\\Collection {#15683\n all: [\n Jiminny\\Models\\AutomatedReportResult {#15703\n id: 14,\n uuid: b\"C^Ð>!€]¢ª1vàý\\x1F6Ï\",\n report_id: 8,\n name: \"Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"team_id\":1,\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"report_type\":\"exec_summary\",\"media_types\":[\"pdf\",\"podcast\"],\"from_date\":\"2024-09-05T00:00:00+00:00\",\"to_date\":\"2026-03-10T23:59:59+00:00\",\"group_ids\":[],\"call_deal_stage\":[],\"current_deal_stage\":[],\"deal_min_value\":null,\"deal_max_value\":null,\"call_types\":[\"conference\",\"dialer\"],\"call_duration_min_seconds\":null,\"call_duration_max_seconds\":null,\"special_requirements\":\"\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"5 Sep 2024 - 10 Mar 2026\",\"playbook_categories\":[],\"custom_name\":null}\",\n response: \"{\"request_id\":\"21805da2-d03e-435e-aa31-76e0fd1f36cf\",\"status\":\"completed\",\"timestamp\":\"2026-03-26T14:10:58.983895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD\",\"report_type\":\"exec_summary\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf\",\"podcast_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt\",\"podcast_audio_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3\",\"podcast_ssml_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/reports\\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml\"}\",\n requested_at: \"2026-03-26 14:06:35\",\n generated_at: \"2026-03-26 14:10:59\",\n sent_at: null,\n created_at: \"2026-03-26 14:06:35\",\n updated_at: \"2026-03-26 14:10:59\",\n report: Jiminny\\Models\\AutomatedReport {#15197\n id: 8,\n #uuid: b\"FWNçôý\\x1Dªš–+âga”d\",\n team_id: 1,\n type: \"exec_summary\",\n status: 1,\n frequency: \"one_off\",\n from: \"2024-09-05 00:00:00\",\n to: \"2026-03-10 00:00:00\",\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[\"conference\",\"dialer\"]\",\n media_types: \"[\"pdf\",\"podcast\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: \"[]\",\n deal_at_call_stages: \"[]\",\n current_deal_stages: \"[]\",\n recipients: \"{\"users\":[]}\",\n jiminny_recipients: \"{\"users\":[]}\",\n additional_prompt_input: \"\",\n custom_name: null,\n activity_search_id: null,\n ask_anything_prompt_id: null,\n expires_at: null,\n created_by: 3248,\n created_at: \"2026-03-26 14:06:32\",\n updated_at: \"2026-03-26 14:06:32\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15701\n id: 43,\n uuid: b\"GJ—\\x14?§ÄÉøN_0A}Ý\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"3fa7c4c9-9714-474a-adf8-4e5f30417ddd\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T07:49:35.099004+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf\"}\",\n requested_at: \"2026-04-14 07:49:04\",\n generated_at: \"2026-04-14 07:49:35\",\n sent_at: null,\n created_at: \"2026-04-14 07:49:03\",\n updated_at: \"2026-04-14 07:49:35\",\n report: Jiminny\\Models\\AutomatedReport {#15196\n id: 33,\n #uuid: b\"I«SŽút\\x17ªˆ'w#V7¦ù\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160,23309]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Ask Jiminny test report\",\n activity_search_id: 26912,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-08 10:12:30\",\n updated_at: \"2026-04-08 10:12:30\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15700\n id: 45,\n uuid: b\"A¢•M8z~‚*l\\x01÷ð\\0s\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"38817a7e-954d-41a2-822a-6c01f7f00073\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T08:41:46.594895+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf\"}\",\n requested_at: \"2026-04-14 08:41:11\",\n generated_at: \"2026-04-14 08:41:46\",\n sent_at: null,\n created_at: \"2026-04-14 08:41:11\",\n updated_at: \"2026-04-14 08:41:46\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15705\n id: 47,\n uuid: b\"D‘\\x10[̘^–𔹧-ÞÝB\",\n report_id: 33,\n name: \"Ask Jiminny test report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54964443\",\"54964442\",\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54214362\",\"54373257\",\"54276602\",\"54547166\",\"54357434\",\"54638437\",\"54439335\",\"54184628\",\"54435911\",\"54547029\",\"54580912\",\"54314274\",\"53918272\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53852885\",\"52697526\",\"53944212\",\"54222051\",\"54125650\",\"54284918\",\"54137014\",\"54142985\",\"53755346\",\"54078231\",\"52175067\",\"54021634\",\"53971125\",\"54077453\",\"54010996\",\"52759195\",\"53028445\",\"54065927\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"52263045\",\"52564798\",\"53604424\",\"53575428\",\"52167221\",\"53545307\",\"53545088\",\"53606423\",\"52956249\",\"52894249\",\"52568574\",\"52527230\",\"53058889\",\"52760234\",\"52263048\",\"52451159\",\"52175073\",\"52358247\",\"52189687\",\"52232025\",\"51980465\",\"52430474\",\"52363300\",\"52346694\",\"52359342\",\"52231503\",\"52255239\",\"50934254\",\"52303651\",\"52258169\",\"51958927\",\"52242714\",\"52239097\",\"52083853\",\"52083904\",\"51765719\",\"52072580\",\"51525359\",\"51806803\"],\"team_id\":1,\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Ask Jiminny test report\"}\",\n response: \"{\"request_id\":\"cc985e96-105b-4491-9a94-b9a72ddedd42\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:38.602513+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf\"}\",\n requested_at: \"2026-04-14 10:46:09\",\n generated_at: \"2026-04-14 10:46:38\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:08\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15196},\n },\n Jiminny\\Models\\AutomatedReportResult {#15687\n id: 49,\n uuid: b\"K·Ì¬Ò\\vþþ«PÈ»‰\\x19™s\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"d20bfefe-ccac-4bb7-ab50-c8bb89199973\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:46:37.905336+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf\"}\",\n requested_at: \"2026-04-14 10:46:16\",\n generated_at: \"2026-04-14 10:46:37\",\n sent_at: null,\n created_at: \"2026-04-14 10:46:16\",\n updated_at: \"2026-04-14 10:46:38\",\n report: Jiminny\\Models\\AutomatedReport {#15219\n id: 35,\n #uuid: b\"\"\"\n @@Àê~xFâˆô\\n\n áKfè\n \"\"\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[9]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[3248,23559]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Test 6\",\n activity_search_id: 10932,\n ask_anything_prompt_id: 65,\n expires_at: \"2026-04-19\",\n created_by: 3248,\n created_at: \"2026-04-14 08:39:14\",\n updated_at: \"2026-04-14 08:39:14\",\n deleted_at: null,\n },\n },\n Jiminny\\Models\\AutomatedReportResult {#15686\n id: 50,\n uuid: b\"GÙµ‚\\{3‡p©ú1ÿÖŽ\",\n report_id: 35,\n name: \"Test 6 - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"Please make a summary for all calls\",\"call_ids\":[\"49880280\",\"49104686\",\"48360159\",\"47193308\",\"44762288\",\"43862984\",\"41678335\",\"41310991\",\"39940631\",\"39779620\",\"39389894\",\"39106205\",\"38745110\",\"38510502\"],\"team_id\":1,\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Test 6\"}\",\n response: \"{\"request_id\":\"5c9d7b33-b582-47d9-8770-a9fa31ffd68d\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T10:49:01.677577+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf\"}\",\n requested_at: \"2026-04-14 10:48:43\",\n generated_at: \"2026-04-14 10:49:01\",\n sent_at: null,\n created_at: \"2026-04-14 10:48:42\",\n updated_at: \"2026-04-14 10:49:01\",\n report: Jiminny\\Models\\AutomatedReport {#15219},\n },\n Jiminny\\Models\\AutomatedReportResult {#15685\n id: 51,\n uuid: b\"L\\x13HSÏÖ»™ŸŽ¦¯Cár{\",\n report_id: 36,\n name: \"Tuesday report - 13 Apr 2026\",\n media_type: \"pdf\",\n parent_id: null,\n status: 2,\n reason: 0,\n payload: \"{\"user_question\":\"test\",\"call_ids\":[\"54214348\",\"54747783\",\"54792639\",\"54355211\",\"54214356\",\"54579532\",\"54214362\",\"54795501\",\"54373257\",\"54566775\",\"54179068\",\"54691680\",\"54702966\",\"54186485\",\"54547166\",\"54357434\",\"54439335\",\"54435911\",\"54547029\",\"54179299\",\"54580912\",\"54314274\",\"53918272\",\"54310744\",\"54447612\",\"54561308\",\"52175046\",\"54531535\",\"54495620\",\"52753147\",\"53853301\",\"52551697\",\"52175055\",\"54358692\",\"54020412\",\"54424068\",\"54222599\",\"53853298\",\"53852885\",\"53931221\",\"54132327\",\"53944212\",\"54037186\",\"54125650\",\"54059512\",\"53801108\",\"54284918\",\"52552430\",\"54142985\",\"53755346\",\"52175067\",\"54021634\",\"52896288\",\"52175051\",\"54077453\",\"52413114\",\"54010996\",\"53528248\",\"54078291\",\"53813598\",\"54076266\",\"53028445\",\"54065927\",\"53922780\",\"53729434\",\"53919824\",\"53384442\",\"52175082\",\"53920744\",\"54020314\",\"52714861\",\"54009217\",\"53765213\",\"53926207\",\"52175042\",\"52948707\",\"53602066\",\"53824355\",\"53769276\",\"53048081\",\"53769369\",\"53384450\",\"52161199\",\"52263045\",\"52564798\",\"50907426\",\"53604424\",\"53575428\",\"52167221\",\"52156369\",\"53545307\",\"52565625\",\"53610225\",\"53594648\",\"53545088\",\"52175041\",\"52956249\",\"52217425\",\"52562272\",\"52248293\"],\"team_id\":1,\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"callback_url\":\"https:\\/\\/team:5hgTDUyu1vqCd@app.staging.jiminny.com\\/webhook\\/reports\\/ready\",\"report_period\":\"13 Apr 2026\",\"report_name\":\"Tuesday report\"}\",\n response: \"{\"request_id\":\"cfd6bb99-4853-4c13-9f8e-a6af43e1727b\",\"status\":\"completed\",\"timestamp\":\"2026-04-14T11:23:03.951289+00:00\",\"s3_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD\",\"pdf_url\":\"s3:\\/\\/stage.jiminny.client-data\\/5f0f4810-7e77-4086-8f69-93429ae4d70b\\/panorama-reports\\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf\"}\",\n requested_at: \"2026-04-14 11:22:36\",\n generated_at: \"2026-04-14 11:23:04\",\n sent_at: null,\n created_at: \"2026-04-14 11:22:36\",\n updated_at: \"2026-04-14 11:23:04\",\n report: Jiminny\\Models\\AutomatedReport {#15221\n id: 36,\n #uuid: b\"Aß#ôq¸»õ¶7i7eçªx\",\n team_id: 1,\n type: \"ask_jiminny\",\n status: 1,\n frequency: \"daily\",\n from: null,\n to: null,\n deal_value_min: null,\n deal_value_max: null,\n call_types: \"[]\",\n media_types: \"[\"pdf\"]\",\n call_duration_min: null,\n call_duration_max: null,\n groups: \"[]\",\n playbook_categories: null,\n deal_at_call_stages: null,\n current_deal_stages: null,\n recipients: \"{\"users\":[7160]}\",\n jiminny_recipients: null,\n additional_prompt_input: null,\n custom_name: \"Tuesday report\",\n activity_search_id: 26913,\n ask_anything_prompt_id: 62,\n expires_at: \"2026-04-30\",\n created_by: 7160,\n created_at: \"2026-04-14 11:20:20\",\n updated_at: \"2026-04-14 11:20:20\",\n deleted_at: null,\n },\n },\n ],\n }\n\n> $repo->getGeneratedNotSentResults()->count();\n= 7\n\n> exit\n\n INFO Goodbye.\n\nroot@b79a4bdd6905:/home/jiminny#","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.004166667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"DEV (docker)","depth":2,"bounds":{"left":0.12291667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.12708333,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"APP (-zsh)","depth":2,"bounds":{"left":0.24583334,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.25,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"ec2-user@ip-10-30-93-249:~ (nc)","depth":2,"bounds":{"left":0.36875,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.37291667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.49166667,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.49583334,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.6145833,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.61875,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"-zsh","depth":2,"bounds":{"left":0.7375,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.7416667,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXRadioButton","text":"✳ Unable to access screenpipe activity data (claude)","depth":2,"bounds":{"left":0.86041665,"top":0.05888889,"width":0.12291667,"height":0.026666667},"role_description":"radio button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Close Tab","depth":3,"bounds":{"left":0.8645833,"top":0.06333333,"width":0.011111111,"height":0.017777778},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"⌥⌘1","depth":1,"bounds":{"left":0.9548611,"top":0.032222223,"width":0.03888889,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"ec2-user@ip-10-30-93-249:~","depth":1,"bounds":{"left":0.4298611,"top":0.033333335,"width":0.13958333,"height":0.017777778},"role_description":"text"}]...
|
7000309365672198019
|
-5261720347317964283
|
idle
|
accessibility
|
NULL
|
Last login: Sat Apr 11 12:38:35 on ttys007
Poetry Last login: Sat Apr 11 12:38:35 on ttys007
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
Poetry could not find a pyproject.toml file in /Users/lukas/jiminny/app or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-18909-automated-reports-ask-jiminny) $ vstg
Warning: Permanently added 'jiminny-stage-ecs1' (ED25519) to the list of known hosts.
A newer release of "Amazon Linux" is available.
Version 2023.10.20260105:
Version 2023.10.20260120:
Version 2023.10.20260202:
Version 2023.10.20260216:
Version 2023.10.20260302:
Version 2023.10.20260325:
Version 2023.10.20260330:
Version 2023.11.20260406:
Version 2023.11.20260413:
Version 2023.8.20250707:
Version 2023.8.20250715:
Version 2023.8.20250721:
Version 2023.8.20250808:
Version 2023.8.20250818:
Version 2023.8.20250908:
Version 2023.8.20250915:
Version 2023.9.20250929:
Version 2023.9.20251014:
Version 2023.9.20251020:
Version 2023.9.20251027:
Version 2023.9.20251105:
Version 2023.9.20251110:
Version 2023.9.20251117:
Version 2023.9.20251208:
Run "/usr/bin/dnf check-release-update" for full release and version update info
, #_
~\_ ####_
~~ \_#####\
~~ \###|
~~ \#/ ___ Amazon Linux 2023 (ECS Optimized)
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
For documentation, visit [URL_WITH_CREDENTIALS] php artisan automated-reports
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Started {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Found 2 daily reports to process {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
[2026-04-14 07:48:51] staging.INFO: [automated-reports] Completed {"correlation_id":"4c37ea47-eebd-4122-8c35-9d6b9d707beb","trace_id":"bfe6b131-e3ad-4cfc-8954-5fb1ecfded81"}
root@fee51d2e1f17:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@73b64f5d54a3:/home/jiminny# php artisan automated-reports
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Started {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:03] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
[2026-04-14 08:41:04] staging.INFO: [automated-reports] Completed {"correlation_id":"c858e03f-62bd-462d-add2-c1e12a4c4cf8","trace_id":"94b4fdcc-f609-42e7-b5b7-b6abfc67e02f"}
root@73b64f5d54a3:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@c78a087b1345:/home/jiminny# php artisan automated-reports
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Started {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Found 3 daily reports to process {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"fa7417aa-538e-49ab-8827-77235637a6f9","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"63e6d70b-b7cb-4dfa-8443-53453e6c4054","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
[2026-04-14 10:46:08] staging.INFO: [automated-reports] Completed {"correlation_id":"5c23e861-2ca9-4f92-9f67-773d6bc80ca0","trace_id":"185df6f6-4327-4609-9c2e-2ab83a0f5432"}
root@c78a087b1345:/home/jiminny# php artisan automated-reports --report-id 35
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Started {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[automated-reports] Automated report found Test 6
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"7e7846e2-c0ea-4040-88f4-0ae14b66ade8","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
[2026-04-14 10:48:42] staging.INFO: [automated-reports] Completed {"correlation_id":"246a1a1a-7076-458c-bd7d-49d2f5a2db88","trace_id":"1f894bf6-e50d-4e99-b635-2aa52627fc27"}
root@c78a087b1345:/home/jiminny# [ec2-user@ip-10-30-93-249 ~]$ docker exec -it $(docker ps --format "{{.ID}}" --filter "name=ecs-worker" | head -1) /bin/bash -c "cd /home/jiminny && bash"
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports --report-id 71b8bbf5-23f4-41df-b637-693765e7aa78
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Started {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Processing daily reports {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[automated-reports] Automated report found Tuesday report
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"71b8bbf5-23f4-41df-b637-693765e7aa78","teamId":1,"frequency":"daily","type":"ask_jiminny"} {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
[2026-04-14 11:22:33] staging.INFO: [automated-reports] Completed {"correlation_id":"90a98201-fc6a-45b9-b3bd-2055cfce711b","trace_id":"8e05a574-88d0-4475-acd0-86c51b5659a5"}
root@b79a4bdd6905:/home/jiminny# php artisan automated-reports:send
root@b79a4bdd6905:/home/jiminny# php artisan tinker
Psy Shell v0.12.21 (PHP 8.3.30 — cli) by Justin Hileman
New PHP manual is available (latest: 3.0.5). Update with `doc --update-manual`
> $repo = app(AutomatedReportsRepository::class);
[!] Aliasing 'AutomatedReportsRepository' to 'Jiminny\Repositories\AutomatedReportsRepository' for this Tinker session.
= Jiminny\Repositories\AutomatedReportsRepository {#15215}
> $repo->getGeneratedNotSentResults();
= Illuminate\Database\Eloquent\Collection {#15683
all: [
Jiminny\Models\AutomatedReportResult {#15703
id: 14,
uuid: b"C^Ð>!€]¢ª1vàý\x1F6Ï",
report_id: 8,
name: "Exec Summary - 5 Sep 2024 - 10 Mar 2026 - All",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"team_id":1,"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","report_type":"exec_summary","media_types":["pdf","podcast"],"from_date":"2024-09-05T00:00:00+00:00","to_date":"2026-03-10T23:59:59+00:00","group_ids":[],"call_deal_stage":[],"current_deal_stage":[],"deal_min_value":null,"deal_max_value":null,"call_types":["conference","dialer"],"call_duration_min_seconds":null,"call_duration_max_seconds":null,"special_requirements":"","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"5 Sep 2024 - 10 Mar 2026","playbook_categories":[],"custom_name":null}",
response: "{"request_id":"21805da2-d03e-435e-aa31-76e0fd1f36cf","status":"completed","timestamp":"2026-03-26T14:10:58.983895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.MD","report_type":"exec_summary","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf.pdf","podcast_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.txt","podcast_audio_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.mp3","podcast_ssml_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/reports\/21805da2-d03e-435e-aa31-76e0fd1f36cf_podcast.ssml"}",
requested_at: "2026-03-26 14:06:35",
generated_at: "2026-03-26 14:10:59",
sent_at: null,
created_at: "2026-03-26 14:06:35",
updated_at: "2026-03-26 14:10:59",
report: Jiminny\Models\AutomatedReport {#15197
id: 8,
#uuid: b"FWNçôý\x1Dªš–+âga”d",
team_id: 1,
type: "exec_summary",
status: 1,
frequency: "one_off",
from: "2024-09-05 00:00:00",
to: "2026-03-10 00:00:00",
deal_value_min: null,
deal_value_max: null,
call_types: "["conference","dialer"]",
media_types: "["pdf","podcast"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: "[]",
deal_at_call_stages: "[]",
current_deal_stages: "[]",
recipients: "{"users":[]}",
jiminny_recipients: "{"users":[]}",
additional_prompt_input: "",
custom_name: null,
activity_search_id: null,
ask_anything_prompt_id: null,
expires_at: null,
created_by: 3248,
created_at: "2026-03-26 14:06:32",
updated_at: "2026-03-26 14:06:32",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15701
id: 43,
uuid: b"GJ—\x14?§ÄÉøN_0A}Ý",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"3fa7c4c9-9714-474a-adf8-4e5f30417ddd","status":"completed","timestamp":"2026-04-14T07:49:35.099004+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/3fa7c4c9-9714-474a-adf8-4e5f30417ddd.pdf"}",
requested_at: "2026-04-14 07:49:04",
generated_at: "2026-04-14 07:49:35",
sent_at: null,
created_at: "2026-04-14 07:49:03",
updated_at: "2026-04-14 07:49:35",
report: Jiminny\Models\AutomatedReport {#15196
id: 33,
#uuid: b"I«SŽút\x17ªˆ'w#V7¦ù",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160,23309]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Ask Jiminny test report",
activity_search_id: 26912,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-08 10:12:30",
updated_at: "2026-04-08 10:12:30",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15700
id: 45,
uuid: b"A¢•M8z~‚*l\x01÷ð\0s",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"38817a7e-954d-41a2-822a-6c01f7f00073","status":"completed","timestamp":"2026-04-14T08:41:46.594895+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/38817a7e-954d-41a2-822a-6c01f7f00073.pdf"}",
requested_at: "2026-04-14 08:41:11",
generated_at: "2026-04-14 08:41:46",
sent_at: null,
created_at: "2026-04-14 08:41:11",
updated_at: "2026-04-14 08:41:46",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15705
id: 47,
uuid: b"D‘\x10[̘^–𔹧-ÞÝB",
report_id: 33,
name: "Ask Jiminny test report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54964443","54964442","54214348","54747783","54792639","54355211","54214356","54214362","54373257","54276602","54547166","54357434","54638437","54439335","54184628","54435911","54547029","54580912","54314274","53918272","54447612","54561308","52175046","54531535","54495620","52753147","52175055","54358692","54020412","54424068","54222599","53852885","52697526","53944212","54222051","54125650","54284918","54137014","54142985","53755346","54078231","52175067","54021634","53971125","54077453","54010996","52759195","53028445","54065927","52175082","53920744","54020314","52714861","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","52263045","52564798","53604424","53575428","52167221","53545307","53545088","53606423","52956249","52894249","52568574","52527230","53058889","52760234","52263048","52451159","52175073","52358247","52189687","52232025","51980465","52430474","52363300","52346694","52359342","52231503","52255239","50934254","52303651","52258169","51958927","52242714","52239097","52083853","52083904","51765719","52072580","51525359","51806803"],"team_id":1,"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Ask Jiminny test report"}",
response: "{"request_id":"cc985e96-105b-4491-9a94-b9a72ddedd42","status":"completed","timestamp":"2026-04-14T10:46:38.602513+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cc985e96-105b-4491-9a94-b9a72ddedd42.pdf"}",
requested_at: "2026-04-14 10:46:09",
generated_at: "2026-04-14 10:46:38",
sent_at: null,
created_at: "2026-04-14 10:46:08",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15196},
},
Jiminny\Models\AutomatedReportResult {#15687
id: 49,
uuid: b"K·Ì¬Ò\vþþ«PÈ»‰\x19™s",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"d20bfefe-ccac-4bb7-ab50-c8bb89199973","status":"completed","timestamp":"2026-04-14T10:46:37.905336+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/d20bfefe-ccac-4bb7-ab50-c8bb89199973.pdf"}",
requested_at: "2026-04-14 10:46:16",
generated_at: "2026-04-14 10:46:37",
sent_at: null,
created_at: "2026-04-14 10:46:16",
updated_at: "2026-04-14 10:46:38",
report: Jiminny\Models\AutomatedReport {#15219
id: 35,
#uuid: b"""
@@Àê~xFâˆô\n
áKfè
""",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[9]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[3248,23559]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Test 6",
activity_search_id: 10932,
ask_anything_prompt_id: 65,
expires_at: "2026-04-19",
created_by: 3248,
created_at: "2026-04-14 08:39:14",
updated_at: "2026-04-14 08:39:14",
deleted_at: null,
},
},
Jiminny\Models\AutomatedReportResult {#15686
id: 50,
uuid: b"GÙµ‚\{3‡p©ú1ÿÖŽ",
report_id: 35,
name: "Test 6 - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"Please make a summary for all calls","call_ids":["49880280","49104686","48360159","47193308","44762288","43862984","41678335","41310991","39940631","39779620","39389894","39106205","38745110","38510502"],"team_id":1,"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Test 6"}",
response: "{"request_id":"5c9d7b33-b582-47d9-8770-a9fa31ffd68d","status":"completed","timestamp":"2026-04-14T10:49:01.677577+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/5c9d7b33-b582-47d9-8770-a9fa31ffd68d.pdf"}",
requested_at: "2026-04-14 10:48:43",
generated_at: "2026-04-14 10:49:01",
sent_at: null,
created_at: "2026-04-14 10:48:42",
updated_at: "2026-04-14 10:49:01",
report: Jiminny\Models\AutomatedReport {#15219},
},
Jiminny\Models\AutomatedReportResult {#15685
id: 51,
uuid: b"L\x13HSÏÖ»™ŸŽ¦¯Cár{",
report_id: 36,
name: "Tuesday report - 13 Apr 2026",
media_type: "pdf",
parent_id: null,
status: 2,
reason: 0,
payload: "{"user_question":"test","call_ids":["54214348","54747783","54792639","54355211","54214356","54579532","54214362","54795501","54373257","54566775","54179068","54691680","54702966","54186485","54547166","54357434","54439335","54435911","54547029","54179299","54580912","54314274","53918272","54310744","54447612","54561308","52175046","54531535","54495620","52753147","53853301","52551697","52175055","54358692","54020412","54424068","54222599","53853298","53852885","53931221","54132327","53944212","54037186","54125650","54059512","53801108","54284918","52552430","54142985","53755346","52175067","54021634","52896288","52175051","54077453","52413114","54010996","53528248","54078291","53813598","54076266","53028445","54065927","53922780","53729434","53919824","53384442","52175082","53920744","54020314","52714861","54009217","53765213","53926207","52175042","52948707","53602066","53824355","53769276","53048081","53769369","53384450","52161199","52263045","52564798","50907426","53604424","53575428","52167221","52156369","53545307","52565625","53610225","53594648","53545088","52175041","52956249","52217425","52562272","52248293"],"team_id":1,"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","callback_url":"https:\/\/team:[EMAIL]\/webhook\/reports\/ready","report_period":"13 Apr 2026","report_name":"Tuesday report"}",
response: "{"request_id":"cfd6bb99-4853-4c13-9f8e-a6af43e1727b","status":"completed","timestamp":"2026-04-14T11:23:03.951289+00:00","s3_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.MD","pdf_url":"s3:\/\/stage.jiminny.client-data\/5f0f4810-7e77-4086-8f69-93429ae4d70b\/panorama-reports\/cfd6bb99-4853-4c13-9f8e-a6af43e1727b.pdf"}",
requested_at: "2026-04-14 11:22:36",
generated_at: "2026-04-14 11:23:04",
sent_at: null,
created_at: "2026-04-14 11:22:36",
updated_at: "2026-04-14 11:23:04",
report: Jiminny\Models\AutomatedReport {#15221
id: 36,
#uuid: b"Aß#ôq¸»õ¶7i7eçªx",
team_id: 1,
type: "ask_jiminny",
status: 1,
frequency: "daily",
from: null,
to: null,
deal_value_min: null,
deal_value_max: null,
call_types: "[]",
media_types: "["pdf"]",
call_duration_min: null,
call_duration_max: null,
groups: "[]",
playbook_categories: null,
deal_at_call_stages: null,
current_deal_stages: null,
recipients: "{"users":[7160]}",
jiminny_recipients: null,
additional_prompt_input: null,
custom_name: "Tuesday report",
activity_search_id: 26913,
ask_anything_prompt_id: 62,
expires_at: "2026-04-30",
created_by: 7160,
created_at: "2026-04-14 11:20:20",
updated_at: "2026-04-14 11:20:20",
deleted_at: null,
},
},
],
}
> $repo->getGeneratedNotSentResults()->count();
= 7
> exit
INFO Goodbye.
root@b79a4bdd6905:/home/jiminny#
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
ec2-user@ip-10-30-93-249:~ (nc)
Close Tab
-zsh
Close Tab
-zsh
Close Tab
-zsh
Close Tab
✳ Unable to access screenpipe activity data (claude)
Close Tab
⌥⌘1
ec2-user@ip-10-30-93-249:~...
|
12751
|
|
12756
|
275
|
0
|
2026-04-14T11:36:32.213042+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166592213_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsService.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.46132812,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.47148436,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.484375,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.49453124,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5046875,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.5175781,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.53046876,"top":0.08611111,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
4735886725318137444
|
-9174860715373425846
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
PhoStormViewNavigateFV faVsco.js v• #1894 on .lY-18909-automated-renorts-ask-liminn)Project v© EmailMessageRepository.pC) GenericAiPromptRepositorg grouprepository.phpInboxEmailBatchRepositonC InboxRepository.pnp© InvitationRepository.pnpC) JobRepositorv.ohpC LanquageRepository.phpC MomentRepository.phpNotificationRepositorv.php© ParticipantRepository.phpC ParticipantSpeechRepositoC ParticipantStatsRepository© PlaybookCategoryRepositcg Playbookkepository.phpPlaylistActivityRepository.pPlaylistRepository.php(C) PlavlistShareRepositorv.ph© QuestionRepository.phpC) RoleChangeEventReposito(C) RoleRepository.php(©) SearchRepository.php©) SnapshotRepository.php©) SocialAccountRepository.pC StageRepository.php© SubscriptionSetRepository.© TaskRepository.php© TeamAiContextRepository.© TeamDomainsRepository.pC) TeaminsiahtsRepositorv.ohC TeamRepository.php©) ThemeRepository.php(C) TimezoneRepository.phpC TopicRepository.phpC TopicTriggerRepository.ph© TrackRepository.php© TranscriptionModelLocaleF© TranscriptionRepository.ph© TranscriptionSummaryRepC UserRepository.phpC) VocabularyRepository.pnp› D Rulesv _ Services> _ Activity> D AjReports>D AvatarlcalendarConterenceM erm> D Import> MInternalv MKioskv M AutomatedReports(C) ActivityTypeService.(©) AskJiminnyReportAc(C) AutomatedReportsC(©) AutomatedReportsSi© DealStagesService.p(© RecipientsService.phsenakeportJoo.onp(©) AutomatedReportsCommand.phpAulomaleakeporissendcommand.ongC AddLayoutEntities.phpc leam.ongC AutomatedReportsRepository.phpCreateHeldActivityEvent.phpe) TrackProviderinstallled-vent.onoC ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsserviceBI02MS [IBAN].16581166.31166411665100016671668100%16701671167216731674167516/61678167916861681168211684168710081689169€169116921693169416951696public function getActivitlescountPayload(array s1nputPayload): array'to date' => StoDate->formatd format: DateTimeInterface::RFC3339)'call deal stage' => $validatedDatal'deal at call stages'] ?2 ['current deal stage' => SvalidatedDatal'current deal stages'] ??M.'deal min value' => $validatedDatal'deal value min' ?? null.'deal max value' => $validatedDatal'deal value max' ?? null.'call types' => $validatedDatal 'call types'.'call_duration_min_seconds' => svalidatedDatal'call_duration_min'J ?? null.'call_duration_max_seconds' => svalidatedDatal'call_duration_max') ?? null'special_requirements' = $validatedbatal'addit1onal_prompt_1nput' ?? null'playbook_categories' => $validatedData['playbook_categories'] ?? [],'request_1d → nuLl.'caLLDacK_UrL = nuLL,susaeespublic function shouldSendReportarray susers, ?CarbonInterface $generatedat = null): boolif (empty($users)) {return talse:nearuestz = coulectcsusers)->mapWithKevs(function (array Suser) <Stz = new DateTimeZone(Suserf'timezone'):$nowUtc = new DateTime( datetime: 'now', new DateTimeZone( timezone: 'UTC')):Soffset = stz->get0ffset(SnowUtc):return [Suserl'timezone' => Soffsetl:->sortbesc)->Keys)->TIrStO:onow = caroon..nowneartrestiz:SisScheduledTime = Cint) Snow->format(( format: 'H') === self::SENT REPORT AT HOURS:if (SisScheduledTime)rerurn uruerreturn sthis->hasPassedScheduLedlime(SgeneratedAt, searllestiz):5 usages116971/16public function hasPassedScheduledTime(?CarbonInterface $generatedAt, string $timezone): boolf...7eousades11717public function calculateFromAndToDatePeriod117181719string Sfrequency.st (today 13:29)Support Daily • in 24 m100% 4Tue 14 Aor 14:36:32AutomatedRenortsCommandTest+0 .= custom.loc= laravel.logc SF liminny@localhost« HS_local fiminny@localhostconsole PROD520v 0J 5231540152752852953053153253315.541155555 A=050539540541542154315442544•54=5471548=5495505515525535545555561558SO.156615674 console [EU1L console [STAGING]Tx: Auto vFlaycroundvliminnyt.owner_1d FROM soc1al_accounts sa017 A 15 V13 ^JolN users u on u.1d = sa.soclable_1dJOIN teams tI.n<->I: on t.ld = U.team_1dWHERE U.team_1d = 1 and sa.provider = salestorce :select * tron reans where 1o =15select x tron groups g Juin playbooks p1..n<->1: on a.plavbook id = p.id wiselect * 1r0Iorouosnere t =oo.select * from playbooks where team_ id = 1:select * from playbooks where id = 175:select * from playbook categories where playbook 1d = 175:select * from users where team_1d = 1:select * from users where 1d = 7160;select * from crm_profiles where user_1d = 7160*select * trom reatures,select# 10, Uud, type, provider, playbook_category-1o, user_1a,leao o, contact* cri conmouracionorciri orovoer LorTranscrrocion orSTatusfrom activities where crm_confiquration id = 1 and type =# and crm_ provider id IS NOT NULLand provider != 'uploader' and actual start time IS NOT NULLORDER by id desc;select * from activities where 1d = 54/47783; # 0000400000pCZOJMACselect p.1d, p.activity_type, pc.1d, pc.nameFRUM playdooks pJoin playdook_cacegories pc"->l.n: on p.1d = pc.playbook_1dwhere p.team_id = 1 and p.activity_type = 'event':SELECT * FROM crm fields WHERE crm confiquration id = 1 and obiect tvpe = !SELECT * FROM crm_ field values WHERE crm_ field id = 4select * from crm_layouts cl join playbook layouts pl1<->1..n: on cl.id =pwhere crm_configuration_1d = 1 and pl.playbooK_1d = 175;select * from teams:SELECI r.* FRUn aucomaced_reporus rjoin ceams t on r.ueam 10 = t.10WHERE r.trequency = "dally"and r.stauus-AND t.status =acmveAND (r.expires at >= now) OR r.expires at IS NULD):select * from automated_report_results where report. id IN (18, 33);select * from activity_searches where 1d = 10952;select * from activity_search_filters where activity_search_1d = 10932)1568 v569select * from automated_reports order by 1d desc;select * tromautomated_report_results order by id desc;select * from automated_report_results where report id IN (36);CascadeDebug Automated RepLogic Walkthroughoteo l. derueneraceanorsentkesultsrerches AutomatedkenortResult recoros wnerergenerated_at IS NOT NULLsent_at Is NULLstatus = STATUS GENERATEDnas arelared revortYour 7 results pass this.Step 2: getValidRecipientUsers()For each result, gets recipients. Since it's an AskJiminny report it goes through resolveAskJiminnyRecipients(→ includes creator. For regular reports it goes through getRecipientUsers() . Either way, the creator has anemail, so validRecipients is not empty.vStenx. shouldSendRenorto - THISS WHERE ITFAILS•phpououic const Inr s-M KerORIAlHOUk =91The logic picks the earliest timezone (highest UTC offset = most ahead of UTC). For GMT+3, the offset is +1080• secondsIt then checks:U php$now = carbon::now($earliestiz);// current time in GMT+3$15ScheduLedTame = (int) §now->format("H*) === 5;// is it 05:00 in GMT+3?The report only sends if it's currently 5:00 AM in the creator's timezone (GMT+3). That means 02:00 UTCIf it's not 5:00 AM right now in GMT+3, it falls through to hasPassedScheduledTime() :0 phppublic function hasPassedScheduledTime(?CarbonInterface SgeneratedAt, string $timezone): booltihis checksgeneratedat < 05:00 today (in GMT+3, converted to UTC) ANDnow > 05:00 today (in GMT+3, converted to UTC)soit onlv returns true If1. The report was generated before 05:00 GMT+3 today (l.e., before 02:00 UTC.2. AND current time is past 05:00 GMT+3 (past 02:00 UTC)Why Nothing Is SentThe current time in GMT+3 is not 05:00 AM, and one of these is also true:• The report was generated after 05:00 GMT+3 (02:00 UTC) today → generatedAtUtc is NOT ‹ scheduledTimeutc, so hasPassedScheduledTime returns false• OR the current time is before 05:00 GMT+3 → nowUtc is NOT > scheduledTimeUtcciven vou 're running this at 2:35 PM UTic+3 14.35 ocaly 11:35 Unic). here's what hapoens.scheduledtame = tocav at 05:00 GMT+3 = 02:00 U10now = 11:35 UTC → past scheduled timevgeneratedat must be before 02:00 UTC todayThe likely cause: the report was generated AFTER 05:00 GMT+3 (after 02:00 UTC) today, so generatedAtUtr.Iffcchedulentimellfr) stalse z hacPaccenSchenulerime returns talce → notina senosAsk anything (&+LClaude Sonnet 4.6ia 4 spacew...
|
NULL
|
|
12815
|
NULL
|
0
|
2026-04-14T11:41:22.698653+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166882698_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormFileFVtavsco.isvProject vEditViewNavigateC PhpStormFileFVtavsco.isvProject vEditViewNavigateCodeLaravelRefactorToolsWindowHelp#11894 on JY-18909-automated-reports-ask-iminny ~ProphetAiv D Reports© AutomatedReportsCi© AutomatedReportsRe© AutomatedReportsS:© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpcreateDatabaseusers.pc Daraoase adecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.gc).iminnvcacheclearcom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom© RecalculateDealRisksCaC) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.php© SendReportJob.phpAutomatedReportsCommand.php© AutomatedReportsSendCommand.phpAadLayoutchuitles.onp= custom.logc leam.ongC AutomatedReportsRepository.phpconsole PROD© AutomatedReportsService.phpCreateHeldActivityEvent.phpCrealenctivityLoggeaevent.oneTrackProviderInstalledEvent.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsSendCommand extends Command521522E laravel.logA console (EU]A SF [jiminny@localhost]A console [STAGING]Tx: Auto vFlaycroundvt.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE U.team_id = 1 and sa.provider = 'salesforce';A HS_local [iminny@localhost]Sa jiminny017 A15 Х13 A2425 GT2832 Ct35 Ct363839404260616264* The name and signature of the console command.* Ovar stringprotected $signature = 'automated-reports:send';1525115401527528529530531* The console command description.535x ovar sarino535protected $description = 'Sends automated reports based on user timezone';public function __construct(private readonly LoggerInterface $logger,private readonly AutomatedReportsRepository $reportRepository,540541542private readonly BusDispatcher $dispatcher,parent::__construct();/*** Execute the console command.* @return intpublic function handle(): int$reportResults = $this->reportRepository->getGeneratedNotSentResults();544545546154715481547550551552553554555556557558foreach ($reportResults as $reportResult) {/** @var AutomatedReportResult $reportResult */$validRecipients = $this->automatedReportsService->getValidRecipientUsers($reportResult->g560$reportResult->get6 561'Dispatching job',562563]):select * tron reans where 1o =15select x tron groupsg suin playpooks p1.n<->1: on g.playbook_id = p.id winselect * TroIgroupsnere t =oo.select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vvid, type, provider, playbook_category_id, user_id,leao o, contact* cri conmouracionorciri orovoer LorTranscrrocion orstatusfrom activities where crm_configuration_id = 1 and type ="conterence"# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks Pjoin playbook_categories pc1<->1..n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = •SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = piwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reportsrjoin teams t on r.teamid = t.idWHERE r. frequency = 'daily'and r.status = 1AND t.status = 'activelAND (r.exRicesuat >= now() OR r.exeicesnat IS NULL);select * from automated_report_results where repontaig IN (18, 33);return CommandAZias::SUCCESS;565566567568 v569570571572select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_report_results order by id desc;select * from automated_report_results where repontaid IN (36);Pushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (today 13:29)hiilSupport Daily • in 19mAL AutomatedReportsCommandTestv100% [45)Tue 14 Apr 14:41:22CascadeDebug Automated Rep+D ...sent at Is NULlstatus = STATUS_GENERATEDnas arelared reoortYour 7 results pass this.wStep 2: getValidRecipientUsers()For each result, gets recipients. Since it's an AskJiminny report it goes through resolveAskJiminnyRecipients()→ includes creator. For regular reports it goes through getRecipientUsers() . Either way, the creator has anemail, so validRecipients is not empty. VStep 3: shouldSendReport() - THIS IS WHERE IT FAILS• phppubLic const int SENI_REPORI_AI_HUURS = 5;The logic picks the earliest timezone (highest UTC offset = most ahead of UTC). For GMT+3, the offset is +1080• secondsIt then checks:O php$now = Carbon::now($earliestTZ);// current time in GMT+3$1sScheduledTime = (int) $now->format('H') === 5;11 is it 05:00 in GMT+3?The report only sends if it's currently 5:00 AM in the creator's timezone (GMT+3). That means 02:00 UTC.If it's not 5:00 AM right now in GMT+3, it falls through to hasPassedScheduledTime()O phppublic function hasPassedScheduledTime(?CarbonInterface SgeneratedAt, string $timezone): boolTihis checksgeneratedAt < 05:00 today (in GMT+3, converted to UTC) ANDnow > 05:00 today (in GMT+3, converted to UTC)So it only returns true if:1. The report was generated before 05:00 GMT+3 today (i.e., before 02:00 UTC)2. AND current time is past 05:00 GMT+3 (past 02:00 UTC)Why Nothing Is SentThe current time in GMT+3 is not 05:00 AM, and one of these is also true:• The report was generated after 05:00 GMT+3 (02:00 UTC) today → generatedAtUtc is NOT < scheduledTimeltc so hasPassedScheduledTime returns false• OR the current time is before 05:00 GMT+3 → nowUtc is NOT > scheduledTimeUtcCven vou re runnine mnis auso rM Ulcrs 143 ocal111ouC nere's wnar naooens.schedullediime =ocavar0o.00cMis=7400 0Cnow = 11:35 UTC → past scheduled timegeneratedAtmust be before 02:00 UTC todayThe likely cause: the report was generated AFTER 05:00 GMT+3 (after 02:00 UTC) today, so generatedAtUtc.lt(scheduledTimeUtc) isfalse → hasPassedScheduledTime returns false → nothing sendsin Snore the revoremustnave deen denerare. derore tne scheou ec senc time (0o.00 nmeuser'stimezone). If it was generated after 05:00 GMT+3, it will only be eligible to send tomorrow at 05:00 GMT+3.IN that case lets change the parameters for @AutomatedReportsSendCommand.php as well and lets add resultid to send and if foudn then do not check+ <› CodeWinasun leams50:5 1o charsuir-o( 4 spaces...
|
NULL
|
2599491551807491702
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormFileFVtavsco.isvProject vEditViewNavigateC PhpStormFileFVtavsco.isvProject vEditViewNavigateCodeLaravelRefactorToolsWindowHelp#11894 on JY-18909-automated-reports-ask-iminny ~ProphetAiv D Reports© AutomatedReportsCi© AutomatedReportsRe© AutomatedReportsS:© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpcreateDatabaseusers.pc Daraoase adecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.gc).iminnvcacheclearcom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php(©) PurgeSoftDeletedOppol© PurgeSyncBatchesCom© RecalculateDealRisksCaC) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.php© SendReportJob.phpAutomatedReportsCommand.php© AutomatedReportsSendCommand.phpAadLayoutchuitles.onp= custom.logc leam.ongC AutomatedReportsRepository.phpconsole PROD© AutomatedReportsService.phpCreateHeldActivityEvent.phpCrealenctivityLoggeaevent.oneTrackProviderInstalledEvent.php© ActivityLogged.phpC RequestGenerateAskJiminnyReportJob.phpRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsSendCommand extends Command521522E laravel.logA console (EU]A SF [jiminny@localhost]A console [STAGING]Tx: Auto vFlaycroundvt.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE U.team_id = 1 and sa.provider = 'salesforce';A HS_local [iminny@localhost]Sa jiminny017 A15 Х13 A2425 GT2832 Ct35 Ct363839404260616264* The name and signature of the console command.* Ovar stringprotected $signature = 'automated-reports:send';1525115401527528529530531* The console command description.535x ovar sarino535protected $description = 'Sends automated reports based on user timezone';public function __construct(private readonly LoggerInterface $logger,private readonly AutomatedReportsRepository $reportRepository,540541542private readonly BusDispatcher $dispatcher,parent::__construct();/*** Execute the console command.* @return intpublic function handle(): int$reportResults = $this->reportRepository->getGeneratedNotSentResults();544545546154715481547550551552553554555556557558foreach ($reportResults as $reportResult) {/** @var AutomatedReportResult $reportResult */$validRecipients = $this->automatedReportsService->getValidRecipientUsers($reportResult->g560$reportResult->get6 561'Dispatching job',562563]):select * tron reans where 1o =15select x tron groupsg suin playpooks p1.n<->1: on g.playbook_id = p.id winselect * TroIgroupsnere t =oo.select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vvid, type, provider, playbook_category_id, user_id,leao o, contact* cri conmouracionorciri orovoer LorTranscrrocion orstatusfrom activities where crm_configuration_id = 1 and type ="conterence"# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks Pjoin playbook_categories pc1<->1..n: on p.id = pc.playbook_idwhere p.team_id = 1 and p.activity_type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = •SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = piwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reportsrjoin teams t on r.teamid = t.idWHERE r. frequency = 'daily'and r.status = 1AND t.status = 'activelAND (r.exRicesuat >= now() OR r.exeicesnat IS NULL);select * from automated_report_results where repontaig IN (18, 33);return CommandAZias::SUCCESS;565566567568 v569570571572select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_report_results order by id desc;select * from automated_report_results where repontaid IN (36);Pushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (today 13:29)hiilSupport Daily • in 19mAL AutomatedReportsCommandTestv100% [45)Tue 14 Apr 14:41:22CascadeDebug Automated Rep+D ...sent at Is NULlstatus = STATUS_GENERATEDnas arelared reoortYour 7 results pass this.wStep 2: getValidRecipientUsers()For each result, gets recipients. Since it's an AskJiminny report it goes through resolveAskJiminnyRecipients()→ includes creator. For regular reports it goes through getRecipientUsers() . Either way, the creator has anemail, so validRecipients is not empty. VStep 3: shouldSendReport() - THIS IS WHERE IT FAILS• phppubLic const int SENI_REPORI_AI_HUURS = 5;The logic picks the earliest timezone (highest UTC offset = most ahead of UTC). For GMT+3, the offset is +1080• secondsIt then checks:O php$now = Carbon::now($earliestTZ);// current time in GMT+3$1sScheduledTime = (int) $now->format('H') === 5;11 is it 05:00 in GMT+3?The report only sends if it's currently 5:00 AM in the creator's timezone (GMT+3). That means 02:00 UTC.If it's not 5:00 AM right now in GMT+3, it falls through to hasPassedScheduledTime()O phppublic function hasPassedScheduledTime(?CarbonInterface SgeneratedAt, string $timezone): boolTihis checksgeneratedAt < 05:00 today (in GMT+3, converted to UTC) ANDnow > 05:00 today (in GMT+3, converted to UTC)So it only returns true if:1. The report was generated before 05:00 GMT+3 today (i.e., before 02:00 UTC)2. AND current time is past 05:00 GMT+3 (past 02:00 UTC)Why Nothing Is SentThe current time in GMT+3 is not 05:00 AM, and one of these is also true:• The report was generated after 05:00 GMT+3 (02:00 UTC) today → generatedAtUtc is NOT < scheduledTimeltc so hasPassedScheduledTime returns false• OR the current time is before 05:00 GMT+3 → nowUtc is NOT > scheduledTimeUtcCven vou re runnine mnis auso rM Ulcrs 143 ocal111ouC nere's wnar naooens.schedullediime =ocavar0o.00cMis=7400 0Cnow = 11:35 UTC → past scheduled timegeneratedAtmust be before 02:00 UTC todayThe likely cause: the report was generated AFTER 05:00 GMT+3 (after 02:00 UTC) today, so generatedAtUtc.lt(scheduledTimeUtc) isfalse → hasPassedScheduledTime returns false → nothing sendsin Snore the revoremustnave deen denerare. derore tne scheou ec senc time (0o.00 nmeuser'stimezone). If it was generated after 05:00 GMT+3, it will only be eligible to send tomorrow at 05:00 GMT+3.IN that case lets change the parameters for @AutomatedReportsSendCommand.php as well and lets add resultid to send and if foudn then do not check+ <› CodeWinasun leams50:5 1o charsuir-o( 4 spaces...
|
NULL
|
|
12816
|
NULL
|
0
|
2026-04-14T11:41:23.980212+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166883980_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpDOCKER3 281DEV SlackFileEditViewGoHistoryWindowHelpDOCKER3 281DEV (docker)882APP (-zsh)created_at:"2026-04-14 11:22:36"updated_at: "2026-04-14 11:23:04"report: Jiminny\Models\AutomatedReport {#15221id: 36,#uuid: b"Aß#ôq,»ö97i7eçªx"team_id: 1,type: "ask_jiminny",status: 1,frequency: "daily",from: null,to: null,deal_value_min: null,deal_value_max: null,call_types: "[]",media_types: "["pdf"]",call_duration_min: null,call_duration_max: null,groups: "[]",playbook_categories: null,deal_at_call_stages: null,current_deal_stages: null,recipients: "{"users": [7160]}",jiminny_recipients: null,additional_prompt_input: null,custom_name: "Tuesday report",activity_search_id: 26913,ask_anything_prompt_id: 62,expires_at: "2026-04-30",created_by: 7160,created_at: "2026-04-14 11:20:20",updated_at: "2026-04-14 11:20:20",deleted_at: null,3,},],}> Srepo->getGeneratedNotSentResults()->countO;> exitINFOGoodbye.root@b79a4bdd6905:/home/jiminny#|*3ec2-userGec2-user@ip-10-30-...+EDHomeDMsActivityFilesLater.*•More+Jiminny... vir scnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...• Direct messages€. Vasil Vasilev3 Aneliya Angelova, ...lo Steliyan Georgiev3Adelina Petrova, Ili...0. Adelina Petrova O. Galya Dimitrova *Rs Nikolay Nikolov "2 Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...Support Daily - in 19 m100% <47Tue 14 Apr 14:41:23→Search Jiminny Inc# releases8 226 0• Messages• Files@ Bookmarks+1f99de0e313cToday ~8b256855f58e5bf1f5) - [JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)(8cf63ce)(https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c) - [JY-19982](https://jiminny.atlassian.net/browse/JY-19982): Allow multiple LLM evals with onecommand run (#464) (steliyan-g)NewCircleCl APP 2:15 PMNew commits deployed to Prophet Prod-EU:[Od2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - [JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (ilian-jiminny)New commits deployed to Prophet Prod-US:[0d2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (flian-jiminny)Message #releases+ Аа......
|
NULL
|
511073142202790458
|
NULL
|
click
|
ocr
|
NULL
|
SlackFileEditViewGoHistoryWindowHelpDOCKER3 281DEV SlackFileEditViewGoHistoryWindowHelpDOCKER3 281DEV (docker)882APP (-zsh)created_at:"2026-04-14 11:22:36"updated_at: "2026-04-14 11:23:04"report: Jiminny\Models\AutomatedReport {#15221id: 36,#uuid: b"Aß#ôq,»ö97i7eçªx"team_id: 1,type: "ask_jiminny",status: 1,frequency: "daily",from: null,to: null,deal_value_min: null,deal_value_max: null,call_types: "[]",media_types: "["pdf"]",call_duration_min: null,call_duration_max: null,groups: "[]",playbook_categories: null,deal_at_call_stages: null,current_deal_stages: null,recipients: "{"users": [7160]}",jiminny_recipients: null,additional_prompt_input: null,custom_name: "Tuesday report",activity_search_id: 26913,ask_anything_prompt_id: 62,expires_at: "2026-04-30",created_by: 7160,created_at: "2026-04-14 11:20:20",updated_at: "2026-04-14 11:20:20",deleted_at: null,3,},],}> Srepo->getGeneratedNotSentResults()->countO;> exitINFOGoodbye.root@b79a4bdd6905:/home/jiminny#|*3ec2-userGec2-user@ip-10-30-...+EDHomeDMsActivityFilesLater.*•More+Jiminny... vir scnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...• Direct messages€. Vasil Vasilev3 Aneliya Angelova, ...lo Steliyan Georgiev3Adelina Petrova, Ili...0. Adelina Petrova O. Galya Dimitrova *Rs Nikolay Nikolov "2 Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...Support Daily - in 19 m100% <47Tue 14 Apr 14:41:23→Search Jiminny Inc# releases8 226 0• Messages• Files@ Bookmarks+1f99de0e313cToday ~8b256855f58e5bf1f5) - [JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)(8cf63ce)(https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c) - [JY-19982](https://jiminny.atlassian.net/browse/JY-19982): Allow multiple LLM evals with onecommand run (#464) (steliyan-g)NewCircleCl APP 2:15 PMNew commits deployed to Prophet Prod-EU:[Od2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - [JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (ilian-jiminny)New commits deployed to Prophet Prod-US:[0d2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (flian-jiminny)Message #releases+ Аа......
|
12814
|
|
12817
|
276
|
0
|
2026-04-14T11:41:30.365183+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166890365_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsSendCommand.php
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
17
15...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"17","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"15","depth":4,"role_description":"text"}]...
|
3562019562073518195
|
-8832605010757203124
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
17
15
SlackFileEditViewGoHistoryWindowHelpDOCKER- 881DEV (docker)882APP (-zsh)created_at:"2026-04-14 11:22:36"updated_at: "2026-04-14 11:23:04"report: Jiminny\Models\AutomatedReport {#15221id: 36,#uuid: b"Aß#ôq,»ö97i7eçªx"team_id: 1,type: "ask_jiminny",status: 1,frequency: "daily",from: null,to: null,deal_value_min: null,deal_value_max: null,call_types: "[]",media_types: "["pdf"]",call_duration_min: null,call_duration_max: null,groups: "[]",playbook_categories: null,deal_at_call_stages: null,current_deal_stages: null,recipients: "{"users": [7160]}",jiminny_recipients: null,additional_prompt_input: null,custom_name: "Tuesday report",activity_search_id: 26913,ask_anything_prompt_id: 62,expires_at: "2026-04-30",created_by: 7160,created_at: "2026-04-14 11:20:20",updated_at: "2026-04-14 11:20:20",deleted_at: null,3,},],}> Srepo->getGeneratedNotSentResults()->countO;> exitINFOGoodbye.root@b79a4bdd6905:/home/jiminny#|*3ec2-userGec2-user@ip-10-30-...+EDHomeDMsActivityFilesLater.*•MoreJiminny... vir scnicrol# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...• Direct messages€. Vasil Vasilev3 Aneliya Angelova, ...lo Steliyan Georgiev3Adelina Petrova, Ili...0. Adelina Petrova O. Galya Dimitrova *Rs Nikolay Nikolov "2 Galya Dimitrova, Ni...2 Galya Dimitrova, Ni..P. Nikolay Yankov::: AppsJira CloudToastGoogle Cale...Support Daily - in 19 m100% <47Tue 14 Apr 14:41:30→Search Jiminny Inc# releases8 226 0• Messages• Files@ Bookmarks+1f99de0e313cToday ~8b256855f58e5bf1f5) - [JY-20571](https://jiminny.atlassian.net/browse/JY-20571): Panorama offline reports (#465)(steliyan-g)(8cf63ce)(https://github.com/jiminny/prophet/commit/8cf63cec5153b6e1320e84c67b03977ce6fe4c0c) - [JY-19982](https://jiminny.atlassian.net/browse/JY-19982): Allow multiple LLM evals with onecommand run (#464) (steliyan-g)NewCircleCl APP 2:15 PMNew commits deployed to Prophet Prod-EU:[Od2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - [JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (ilian-jiminny)New commits deployed to Prophet Prod-US:[0d2170f](https://github.com/jiminny/prophet/commit/0d2170fd4f25032fe37738e936a418512ca7b6e2) - JY-20544](https://jiminny.atlassian.net/browse/JY-20544)eval changes (#459) (flian-jiminny)Message #releases+ Аа......
|
NULL
|
|
12818
|
277
|
0
|
2026-04-14T11:41:30.397389+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776166890397_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsSendCommand.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
17
15...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.03046875,"top":0.017361112,"width":0.0453125,"height":0.022222223},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.07578125,"top":0.017361112,"width":0.14257812,"height":0.022222223},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.78515625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsCommandTest","depth":6,"bounds":{"left":0.803125,"top":0.017361112,"width":0.09765625,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9007813,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsCommandTest'","depth":6,"bounds":{"left":0.9140625,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9273437,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96015626,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9734375,"top":0.017361112,"width":0.01328125,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9867188,"top":0.017361112,"width":0.013281226,"height":0.022222223},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.46132812,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.47148436,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.484375,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.49453124,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5046875,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.5175781,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.53046876,"top":0.08611111,"width":0.028515626,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.56171876,"top":0.08611111,"width":0.01015625,"height":0.016666668},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5746094,"top":0.08611111,"width":0.034765624,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.67929685,"top":0.08611111,"width":0.033203125,"height":0.016666668},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.049609374,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.01015625,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"17","depth":4,"bounds":{"left":0.65703124,"top":0.10763889,"width":0.0109375,"height":0.013194445},"role_description":"text"},{"role":"AXStaticText","text":"15","depth":4,"bounds":{"left":0.6703125,"top":0.10763889,"width":0.011328125,"height":0.013194445},"role_description":"text"}]...
|
3562019562073518195
|
-8832605010757203124
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
#11894 on JY-18909-automa Project: faVsco.js, menu
#11894 on JY-18909-automated-reports-ask-jiminny, menu
Start Listening for PHP Debug Connections
AutomatedReportsCommandTest
Run 'AutomatedReportsCommandTest'
Debug 'AutomatedReportsCommandTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
17
15
PhpStormFileFVtavsco.isvProject vEditViewNavigateCodeLaravelRefactor#11894 on JY-18909-automated-reports-ask-iminny ~ToolsWindowHelpProphetAiv D Reports© AutomatedReportsCi© AutomatedReportsRe© AutomatedReportsS:© CreateMockAskJimir© DeleteReportComma© GenerateMarketingR© Team.php© Usage.phpD Slack• TeamsD TracksO TranscriptionO TwilioD UsersVocabularyDZoom© CoachingFeedbacksUpr© Command.phpcreateDatabaseusers.pc Daraoase oecountoi© DeleteOldAiCrmNotesC:© DeleteS3LeftoversComiDevPostmanCommand./© DiarizeViaAiParticipantk© EncryptTokensComman© EngagementStatsRegen© FeatureFlagsHelper.php© FixCrossTenantissues.p© FlushRolesPermissionsC© GeneratelnternalWebho• GroupSetDefaultLangua© HelperTruncateCoachin© HubspotJournalPollingC© HubspotWebhookServic© ImportRecording.php@ Imnortli|sercFromCcvEil© IterateUsersCommand.g© JiminnyCacheClearCom© JiminnyDebugCommanc© JiminnySetEncryptedTo© JiminnyTokenInfoComn© MakeSlackLiveCoaching© ManageScimForTeam.p© MarkBranchForEnvironn© MuteOrganizerChannel.© PhpApm.php© PropagateCoachingFeer© PurgeConferences.php© PurgeSoftDeletedOppor© PurgeSyncBatchesCom© RecalculateDealRisksCo(C) RemoveDeleteMarkersd© RemoveExpiredNudgest© RemoveUnusedParticip:© ResetElasticSearch.php© RestoreActivityCrmProv© RestoreActivityTypeCor© ReportController.php© SendReportJob.phpAutomatedReportsCommand.php© AutomatedReportsSendCommand.phpAadLayoutchuitles.onp= custom.logc leam.ongC AutomatedReportsRepository.phpconsole PROD© AutomatedReportsService.phpCreateHeldActivityEvent.php© UserPilotActivityListener.phpC RequestGenerateAskJiminnyReportJob.php© TrackProviderInstalledEvent.php© ActivityLogged.phpRequestGeneratekeporJob.ong© AutomatedReportResult.php© AutomatedReport.phpclass AutomatedReportsSendCommand extends Command520521522E laravel.logA console (EU]A SF [jiminny@localhost]A console [STAGING]Tx: Auto vFlaycroundvt.owner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t1..n<->1: on t.id = u.team_idWHERE U.team_id = 1 and sa.provider = 'salesforce';A HS_local [iminny@localhost]Sa jiminny v017 A15 Х13 A2425 GT2832 Ct35 Ct36373840414245474954555860616263* The name and signature of the console command.* Ovar stringprotected $signature = 'automated-reports:send';* The console command description.x ovar sarino52415251154015275285295305315325335345351554protected $description = 'Sends automated reports based on user timezone';public function __construct(private readonly LoggerInterface $logger,private readonly AutomatedReportsRepository $reportRepository,private readonly AutomatedReportsService $automatedReportsService,private readonly BusDispatcher $dispatcher,parent::__construct();/*** Execute the console command.* @return intpublic function handle(): int$reportResults = $this->reportRepository->getGeneratedNotSentResults();155000%54054154254354454554654715481547550551552553554555556foreach ($reportResults as $reportResult) {1558/** @var AutomatedReportResult $reportResult */$validRecipients = $this->automatedReportsService->getValidRecipientUsers($reportResult->g560if ($this->automatedReportsService->shouldSendReport($validRecipients,$reportResult->get6 561'Dispatching job',562563]):564565Sthis->dispatcher->dispatch(new SendRgportJob($reportResult->getUvid()));566567568 v569return CommandAZias::SUCCESS;570571572select * tron reans where 1o =15select x tron groupsg suin playpooks p1.n<->1: on g.playbook_id = p.id winselect * TroIgroupsnere t =oo.select * from playbooks where team_id = 1;select * from playbooks where id = 175;select * from playbook_categories where playbook_id = 175;select * from users where team_id = 1;select * from users where id = 7160;select * from crm_profiles where user_id = 7160;select * from features;select# id, vvid, type, provider, playbook_category_id, user_id,leao o, contact* cri contouracionlorcirn orovoer LorTranscrrocion orstatusfrom activities where crm_configuration_id = 1 and type ="conterence"# and crm_provider_id IS NOT NULLand provider != 'uploader' and actual_start_time IS NOT NULLORDER by id desc;select * from activities where id = 54747783; # 00U0400000pCZojMACselect p.id, p.activity_type, pc.id, pc.nameFROM playbooks pjoin playbook_categories pc"->l.n: on p.1d = pc.playbook_1dwhere p.team_id = 1 and p.activity_type = 'event':SELECT * FROM crm_fields WHERE crm_configuration_id = 1 and object_type = •SELECT * FROM crm_field_values WHERE crm_field_id = 4;select * from crm_layouts cl join playbook_layouts pl1<->1..n: on cl.id = piwhere crm_configuration_id = 1 and pl.playbook_id = 175;select * from teams;SELECT r.* FROM automated_reportsrjoin teams t on r.teamid = t.idWHERE r. frequency = 'daily'and r.status = 1AND t.status = 'activelAND (r.exRicesuat >= now() OR r.exeicesnat IS NULL);select * from automated_report_results where repontaig IN (18, 33);select * from activity_searches where id = 10932;select * from activity_search_filters where activity_search_id = 10932;select * from automated_reports order by id desc;select * from automated_report_results order by id desc;select * from automated_report_results where repontaid IN (36);Pushed 1 commit to origin/JY-18909-automated-reports-ask-jiminny // View pull request (today 13:29)hiilSupport Daily • in 19mAL AutomatedReportsCommandTestv100% [45)Tue 14 Apr 14:41:30CascadeDebug Automated Rep+D ...sent at Is NULlstatus = STATUS_GENERATEDnas arelared reoortYour 7 results pass this.Step 2: getValidRecipientUsers()For each result, gets recipients. Since it's an AskJiminny report it goes through resolveAskJiminnyRecipients()→ includes creator. For regular reports it goes through getRecipientUsers() . Either way, the creator has anemail, so validRecipients is not empty. VStep 3: shouldSendReport() - THIS IS WHERE IT FAILS• phppubLic const int SENI_REPORI_AI_HUURS = 5;The logic picks the earliest timezone (highest UTC offset = most ahead of UTC). For GMT+3, the offset is +1080• secondsIt then checks:O php$now = Carbon::now($earliestTZ); // current time in GMT+3$1sScheduledTime = (int) $now->format('H') === 5;11 is it 05:00 in GMT+3?The report only sends if it's currently 5:00 AM in the creator's timezone (GMT+3). That means 02:00 UTC.If it's not 5:00 AM right now in GMT+3, it falls through to hasPassedScheduledTime()O phppublic function hasPassedScheduledTime(?CarbonInterface SgeneratedAt, string $timezone): boolTihis checksgeneratedAt < 05:00 today (in GMT+3, converted to UTC) ANDnow > 05:00 today (in GMT+3, converted to UTC)So it only returns true if:1. The report was generated before 05:00 GMT+3 today (i.e., before 02:00 UTC)2. AND current time is past 05:00 GMT+3 (past 02:00 UTC)Why Nothing Is SentThe current time in GMT+3 is not 05:00 AM, and one of these is also true:• The report was generated after 05:00 GMT+3 (02:00 UTC) today → generatedAtUtc is NOT < scheduledTimeltc so hasPassedScheduledTime returns false• OR the current time is before 05:00 GMT+3 → nowUtc is NOT > scheduledTimeUtcCven vou re runnine mnis auso rM Ulcrs 143 ocal111ouC nere's wnar naooens.schedu ledtime = today at 0o.00 GMIfs= 02.00U1enow = 11:35 UTC → past scheduled timegeneratedAtmust be before 02:00 UTC todayThe likely cause: the report was generated AFTER 05:00 GMT+3 (after 02:00 UTC) today, so generatedAtUtc.lt(scheduledTimeUtc) isfalse → hasPassedScheduledTime returns false → nothing sendsin Snore the revoremustnave deen denerare. derore tne scheou ec senc time (0o.00 nmeuser'stimezone). If it was generated after 05:00 GMT+3, it will only be eligible to send tomorrow at 05:00 GMT+3.IN that case lets change the parameters for @AutomatedReportsSendCommand. php as well and lets add resultid to send and if foudn then do not check shouldSendReport but call direct+ <> CodeWinasun leams50:5 16 charsuir-o( 4 spaces...
|
12815
|