|
10060
|
195
|
31
|
2026-04-14T08:09:55.979949+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776154195979_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
FirefoxFileEoitViewHistoryBookmarksProfilesToolsWi FirefoxFileEoitViewHistoryBookmarksProfilesToolsWindow Help= ( meet.google.com/mie-gawc-dsi~ Google Gemini...I1 Meet|Platform Sprint 1 Q2 - Platform Tea& Configure SSH access to multiple e@ Console Home | Console Home | usSecurityGroup | EC2 | us-east-2JY-20543 add AJ reports User pilcSRD-6779 |JY-20632 | Unable to |( Jy 19798 evaluation for ai activity Jiminnyg Ask Jiminny test report - 8 Apr 201- Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc(x) Configure SSH access to multipleC CloudWatch I us-east-2Meet - Daily - Platformộs Settings+ New Tabwhy I can't see speakerdata on meemt in firefox.ho wto set it upShow thinking~Dealing with missing features right when youneed them is incredibly frustrating. Assuming"meemt" means Google Meet, the reason youcan't see your speaker data comes down tohow Firefox interacts with Google's platformcompared to Chrome.Since "speaker data" can mean a couple ofdifferent things in a meeting, here are the twomost likely causes for your issue and exactlyhow to get things working.1. You Need "Speaker Notes" for GoogleSlidesThe Reality: Google Meet has a native featurethat lets you see your presentation's speakernotes right inside the video call interface.However, this relies on a specific "Present aTab" technology built exclusively for GoogleChrome. Firefox handles screen sharingdifferently, so that native integration simplywon't load.How to set it up (The Firefox Workaround):You can still present and read your notes inFirefox by manually managing your windows.Lukas Kovaliky soundcore A..I men in dia (arc) | can see myheadphones in both microphone andspeakersPro vYour Jiminny chats aren't used to improve our models. Gemini is Alane can make mistakes, Inciualne aoout peodleYour privacy & GeminiSummarize page•< 40 ll • ( Support Daily • in 3h 51m100% C • Tue 14 Apr 11:09:55=[EMAIL] accountDaily - PlatformE Scheduled forThu, Apr 16 9:45 AM* Use Gemini to take notesShare notes and transcriptStartJoin anywayOther ways to join v4) System Defa...[ FaceTime HD...Ct Backgrounds.loucn-uo apoearanceGenerate an Al backgroundChoose backgrounds and effectsGemini is available in Meet as vour personal in-meetina assistant. It can analvze conversation via temborarviaccess to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meetinghost can turn it oft. Learn more...
|
NULL
|
-9181931024571955506
|
NULL
|
click
|
ocr
|
NULL
|
FirefoxFileEoitViewHistoryBookmarksProfilesToolsWi FirefoxFileEoitViewHistoryBookmarksProfilesToolsWindow Help= ( meet.google.com/mie-gawc-dsi~ Google Gemini...I1 Meet|Platform Sprint 1 Q2 - Platform Tea& Configure SSH access to multiple e@ Console Home | Console Home | usSecurityGroup | EC2 | us-east-2JY-20543 add AJ reports User pilcSRD-6779 |JY-20632 | Unable to |( Jy 19798 evaluation for ai activity Jiminnyg Ask Jiminny test report - 8 Apr 201- Service-Desk - Queues - PlatformC JY-20543 add AJ reports User pilc(x) Configure SSH access to multipleC CloudWatch I us-east-2Meet - Daily - Platformộs Settings+ New Tabwhy I can't see speakerdata on meemt in firefox.ho wto set it upShow thinking~Dealing with missing features right when youneed them is incredibly frustrating. Assuming"meemt" means Google Meet, the reason youcan't see your speaker data comes down tohow Firefox interacts with Google's platformcompared to Chrome.Since "speaker data" can mean a couple ofdifferent things in a meeting, here are the twomost likely causes for your issue and exactlyhow to get things working.1. You Need "Speaker Notes" for GoogleSlidesThe Reality: Google Meet has a native featurethat lets you see your presentation's speakernotes right inside the video call interface.However, this relies on a specific "Present aTab" technology built exclusively for GoogleChrome. Firefox handles screen sharingdifferently, so that native integration simplywon't load.How to set it up (The Firefox Workaround):You can still present and read your notes inFirefox by manually managing your windows.Lukas Kovaliky soundcore A..I men in dia (arc) | can see myheadphones in both microphone andspeakersPro vYour Jiminny chats aren't used to improve our models. Gemini is Alane can make mistakes, Inciualne aoout peodleYour privacy & GeminiSummarize page•< 40 ll • ( Support Daily • in 3h 51m100% C • Tue 14 Apr 11:09:55=[EMAIL] accountDaily - PlatformE Scheduled forThu, Apr 16 9:45 AM* Use Gemini to take notesShare notes and transcriptStartJoin anywayOther ways to join v4) System Defa...[ FaceTime HD...Ct Backgrounds.loucn-uo apoearanceGenerate an Al backgroundChoose backgrounds and effectsGemini is available in Meet as vour personal in-meetina assistant. It can analvze conversation via temborarviaccess to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meetinghost can turn it oft. Learn more...
|
10057
|
|
81741
|
2173
|
34
|
2026-04-25T16:42:06.990757+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-25/1777 /Users/lukas/.screenpipe/data/data/2026-04-25/1777135326990_m2.jpg...
|
Firefox
|
DXP4800PLUS-B5F8 — Personal
|
1
|
nas.lakylak.xyz/desktop/#/
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
New Tab
MikroTik · CRS304-4XG-IN
MikroTik · CRS304-4XG-IN
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
5.7
KB/s
18.8
KB/s
Files
Control Panel
Storage
App Center
Logs
Support
Task Manager
Universal Search
Music
Cloud Drives
Theater
Photos
Online Office
TextEdit
Virtual Machine
Downloads
DLNA
File Version Explorer
Security
Jellyfin-HT
SAN Manager
Vault
Snapshot
Comics
Sync & Backup
Control Panel
Search
Connection & Access
User Management
File Service
Device Connection
Domain/LDAP
Terminal
General
Hardware & Power
Time & Language
Network
Security
Indexing Service
Service
About
Update & Restore
General
Storage
Service
Device analysis
Device Name
DXP4800PLUS-B5F8
UGREENlink ID
-
System Version
1.14.1.0107
Device Owner
k****[EMAIL]
Device
Model
DXP4800 Plus
SN
EC752JJ12253B5F8
Warranty Expiration Date
-
Last boot time
2026-04-08 18:40:30
Power Time
17 days 01 hour 01 minute 36 seconds
Hardware
CPU
Intel(R) Pentium(R) Gold 8505
4400
5 Cores
6 Threads
68 °C
Memory 1 (Kingston)
9905789-161.A00G
32 GB
5600 MHz
Memory 2 (Kingston)
9905789-161.A00G
32 GB
5600 MHz
Network
VBR-LAN1
[IP_ADDRESS]
1Gbps
MTU1500
Mac Address1/Subnet mask
6c:1f:f7:56:6d:9a
[IP_ADDRESS]
Others
UPS
US3000...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"DXP4800PLUS-B5F8","depth":4,"bounds":{"left":0.0018284575,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXRadioButton","text":"Inbox (7) - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.03856383,"top":0.0518755,"width":0.03656915,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"(56) Inbox | kovaliklukas@proton.me | Proton Mail","depth":4,"bounds":{"left":0.07513298,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Welcome back","depth":4,"bounds":{"left":0.0,"top":0.09497207,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Welcome back","depth":5,"bounds":{"left":0.013297873,"top":0.10614525,"width":0.025265958,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":4,"bounds":{"left":0.0,"top":0.12769353,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":5,"bounds":{"left":0.013297873,"top":0.13886672,"width":0.26263297,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Today's Deals","depth":4,"bounds":{"left":0.0,"top":0.16041501,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Today's Deals","depth":5,"bounds":{"left":0.013297873,"top":0.17158818,"width":0.024102394,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"architecture - screenpipe docs","depth":4,"bounds":{"left":0.0,"top":0.19313647,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"architecture - screenpipe docs","depth":5,"bounds":{"left":0.013297873,"top":0.20430966,"width":0.053523935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.22585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.23703113,"width":0.1747008,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Screenpipe — Archive","depth":4,"bounds":{"left":0.0,"top":0.2585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Screenpipe — Archive","depth":5,"bounds":{"left":0.013297873,"top":0.2697526,"width":0.037898935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SQLite Web: archive.db","depth":4,"bounds":{"left":0.0,"top":0.29130086,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: archive.db","depth":5,"bounds":{"left":0.013297873,"top":0.30247405,"width":0.040724736,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SQLite Web: db.sqlite","depth":4,"bounds":{"left":0.0,"top":0.32402235,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: db.sqlite","depth":5,"bounds":{"left":0.013297873,"top":0.33519554,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Platform","depth":4,"bounds":{"left":0.0,"top":0.3567438,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Platform","depth":5,"bounds":{"left":0.013297873,"top":0.367917,"width":0.027925532,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":4,"bounds":{"left":0.0,"top":0.38946527,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":5,"bounds":{"left":0.013297873,"top":0.40063846,"width":0.09790558,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":4,"bounds":{"left":0.0,"top":0.42218676,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":5,"bounds":{"left":0.013297873,"top":0.43335995,"width":0.22556517,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":4,"bounds":{"left":0.0,"top":0.45490822,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":5,"bounds":{"left":0.013297873,"top":0.4660814,"width":0.08826463,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.48762968,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.49880287,"width":0.28075132,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gitea Official Website","depth":4,"bounds":{"left":0.0,"top":0.5203512,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gitea Official Website","depth":5,"bounds":{"left":0.013297873,"top":0.53152436,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":4,"bounds":{"left":0.0,"top":0.55307263,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":5,"bounds":{"left":0.013297873,"top":0.5642458,"width":0.10555186,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"bounds":{"left":0.0,"top":0.5857941,"width":0.113696806,"height":0.032721467},"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.013297873,"top":0.5969673,"width":0.014960106,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"MikroTik · CRS304-4XG-IN","depth":4,"bounds":{"left":0.0,"top":0.61851555,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"MikroTik · CRS304-4XG-IN","depth":5,"bounds":{"left":0.013297873,"top":0.62968874,"width":0.046875,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.0028257978,"top":0.6528332,"width":0.108211435,"height":0.025538707},"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.0028257978,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Le Chat Mistral (⌃X)","depth":6,"bounds":{"left":0.013796543,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.024933511,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.036070477,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Bitwarden","depth":6,"bounds":{"left":0.04720745,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"5.7","depth":15,"bounds":{"left":0.9247008,"top":0.06264964,"width":0.0051529254,"height":0.008379889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"KB/s","depth":15,"bounds":{"left":0.92985374,"top":0.06304868,"width":0.005984043,"height":0.0075818035},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"18.8","depth":15,"bounds":{"left":0.9247008,"top":0.07222666,"width":0.0071476065,"height":0.008379889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"KB/s","depth":15,"bounds":{"left":0.9318484,"top":0.0726257,"width":0.005984043,"height":0.0075818035},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Files","depth":13,"bounds":{"left":0.13663563,"top":0.1707901,"width":0.009973404,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Control Panel","depth":13,"bounds":{"left":0.12749335,"top":0.2697526,"width":0.02825798,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Storage","depth":13,"bounds":{"left":0.13347739,"top":0.36871508,"width":0.016289894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"App Center","depth":13,"bounds":{"left":0.12982048,"top":0.46767756,"width":0.023603724,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logs","depth":13,"bounds":{"left":0.13663563,"top":0.5666401,"width":0.009973404,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Support","depth":13,"bounds":{"left":0.13347739,"top":0.66560256,"width":0.016289894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Task Manager","depth":13,"bounds":{"left":0.12699468,"top":0.76456505,"width":0.02925532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Universal Search","depth":13,"bounds":{"left":0.123836435,"top":0.86352754,"width":0.03557181,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Music","depth":13,"bounds":{"left":0.18334441,"top":0.1707901,"width":0.012300532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Cloud Drives","depth":13,"bounds":{"left":0.17619681,"top":0.2697526,"width":0.026595745,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Theater","depth":13,"bounds":{"left":0.18151596,"top":0.36871508,"width":0.015957447,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Photos","depth":13,"bounds":{"left":0.18218085,"top":0.46767756,"width":0.01462766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Online Office","depth":13,"bounds":{"left":0.17603059,"top":0.5666401,"width":0.026928192,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"TextEdit","depth":13,"bounds":{"left":0.18118352,"top":0.66560256,"width":0.01662234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Virtual Machine","depth":13,"bounds":{"left":0.17353724,"top":0.76456505,"width":0.031914894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Downloads","depth":13,"bounds":{"left":0.17802526,"top":0.86352754,"width":0.022938829,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"DLNA","depth":13,"bounds":{"left":0.23121676,"top":0.1707901,"width":0.012300532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"File Version Explorer","depth":13,"bounds":{"left":0.2159242,"top":0.2697526,"width":0.04288564,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Security","depth":13,"bounds":{"left":0.22888963,"top":0.36871508,"width":0.016954787,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Jellyfin-HT","depth":13,"bounds":{"left":0.22639628,"top":0.46767756,"width":0.021941489,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"SAN Manager","depth":13,"bounds":{"left":0.22273937,"top":0.5666401,"width":0.02925532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Vault","depth":13,"bounds":{"left":0.2322141,"top":0.66560256,"width":0.010305851,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Snapshot","depth":13,"bounds":{"left":0.22755983,"top":0.76456505,"width":0.019614361,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Comics","depth":13,"bounds":{"left":0.22955452,"top":0.86352754,"width":0.015625,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Sync & Backup","depth":13,"bounds":{"left":0.26944813,"top":0.1707901,"width":0.03158245,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Control Panel","depth":10,"bounds":{"left":0.54787236,"top":0.19872306,"width":0.025930852,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"","depth":10,"bounds":{"left":0.7430186,"top":0.19473264,"width":0.007978723,"height":0.01915403},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":11,"bounds":{"left":0.7443484,"top":0.19792499,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.37898937,"top":0.23463687,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Search","depth":15,"bounds":{"left":0.3863032,"top":0.22745411,"width":0.028922873,"height":0.025538707},"help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Connection & Access","depth":16,"bounds":{"left":0.36535904,"top":0.25618514,"width":0.037898935,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"User Management","depth":18,"bounds":{"left":0.37533244,"top":0.2905028,"width":0.040059842,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"File Service","depth":18,"bounds":{"left":0.37533244,"top":0.32881084,"width":0.025930852,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device Connection","depth":18,"bounds":{"left":0.37533244,"top":0.36711892,"width":0.025598405,"height":0.031923383},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Domain/LDAP","depth":18,"bounds":{"left":0.37533244,"top":0.424581,"width":0.031083776,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Terminal","depth":18,"bounds":{"left":0.37533244,"top":0.46288908,"width":0.019115692,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"General","depth":16,"bounds":{"left":0.36535904,"top":0.5019952,"width":0.01412899,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Hardware & Power","depth":18,"bounds":{"left":0.37533244,"top":0.5363129,"width":0.04105718,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Time & Language","depth":18,"bounds":{"left":0.37533244,"top":0.5746209,"width":0.03873005,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Network","depth":18,"bounds":{"left":0.37533244,"top":0.612929,"width":0.018284574,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Security","depth":18,"bounds":{"left":0.37533244,"top":0.651237,"width":0.018284574,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Indexing Service","depth":18,"bounds":{"left":0.37533244,"top":0.6895451,"width":0.036901597,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Service","depth":16,"bounds":{"left":0.36535904,"top":0.7286512,"width":0.013297873,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"About","depth":18,"bounds":{"left":0.37533244,"top":0.7629689,"width":0.013464096,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Update & Restore","depth":18,"bounds":{"left":0.37533244,"top":0.8012769,"width":0.0390625,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"General","depth":17,"bounds":{"left":0.43882978,"top":0.2330407,"width":0.017287234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Storage","depth":17,"bounds":{"left":0.4644282,"top":0.2330407,"width":0.017287234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Service","depth":17,"bounds":{"left":0.4900266,"top":0.2330407,"width":0.01662234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device analysis","depth":17,"bounds":{"left":0.5149601,"top":0.2330407,"width":0.03474069,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device Name","depth":15,"bounds":{"left":0.44514626,"top":0.28890663,"width":0.023936171,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"DXP4800PLUS-B5F8","depth":16,"bounds":{"left":0.44514626,"top":0.3056664,"width":0.045212764,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":18,"bounds":{"left":0.49235374,"top":0.30766162,"width":0.0039893617,"height":0.009577015},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"UGREENlink ID","depth":15,"bounds":{"left":0.44514626,"top":0.33519554,"width":0.028091755,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"-","depth":16,"bounds":{"left":0.44514626,"top":0.3519553,"width":0.0014960107,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"System Version","depth":15,"bounds":{"left":0.59640956,"top":0.28890663,"width":0.027593086,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"1.14.1.0107","depth":16,"bounds":{"left":0.59640956,"top":0.3056664,"width":0.024601065,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device Owner","depth":15,"bounds":{"left":0.59640956,"top":0.33519554,"width":0.024933511,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"k****s@proton.me","depth":16,"bounds":{"left":0.59640956,"top":0.35035914,"width":0.039727394,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.63896275,"top":0.35235435,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.44614363,"top":0.4102155,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device","depth":16,"bounds":{"left":0.45445478,"top":0.4094174,"width":0.014295213,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Model","depth":15,"bounds":{"left":0.44514626,"top":0.43575418,"width":0.010804521,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"DXP4800 Plus","depth":16,"bounds":{"left":0.44514626,"top":0.45331204,"width":0.026595745,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"SN","depth":15,"bounds":{"left":0.44514626,"top":0.4820431,"width":0.005485372,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"EC752JJ12253B5F8","depth":18,"bounds":{"left":0.44514626,"top":0.49960095,"width":0.037400264,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":17,"bounds":{"left":0.48387632,"top":0.50039905,"width":0.0039893617,"height":0.009577015},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Warranty Expiration Date","depth":15,"bounds":{"left":0.44514626,"top":0.528332,"width":0.04438165,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"-","depth":16,"bounds":{"left":0.44514626,"top":0.54588985,"width":0.0013297872,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Last boot time","depth":15,"bounds":{"left":0.44514626,"top":0.5746209,"width":0.025099734,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-08 18:40:30","depth":16,"bounds":{"left":0.44514626,"top":0.59217876,"width":0.037400264,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Power Time","depth":15,"bounds":{"left":0.44514626,"top":0.6209098,"width":0.021110373,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"17 days 01 hour 01 minute 36 seconds","depth":16,"bounds":{"left":0.44514626,"top":0.63846767,"width":0.07263963,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.59707445,"top":0.4102155,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Hardware","depth":16,"bounds":{"left":0.60538566,"top":0.4094174,"width":0.020113032,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"CPU","depth":15,"bounds":{"left":0.59607714,"top":0.43575418,"width":0.008477394,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Intel(R) Pentium(R) Gold 8505","depth":18,"bounds":{"left":0.59607714,"top":0.45331204,"width":0.056349736,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"4400","depth":18,"bounds":{"left":0.6584109,"top":0.45331204,"width":0.00880984,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"5 Cores","depth":18,"bounds":{"left":0.6732048,"top":0.45331204,"width":0.01462766,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"6 Threads","depth":18,"bounds":{"left":0.6938165,"top":0.45331204,"width":0.018783245,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"68 °C","depth":18,"bounds":{"left":0.71858376,"top":0.45331204,"width":0.010139627,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Memory 1 (Kingston)","depth":15,"bounds":{"left":0.59607714,"top":0.4820431,"width":0.03706782,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"9905789-161.A00G","depth":18,"bounds":{"left":0.59607714,"top":0.49960095,"width":0.03507314,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"32 GB","depth":18,"bounds":{"left":0.6371343,"top":0.49960095,"width":0.011469414,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"5600 MHz","depth":18,"bounds":{"left":0.65458775,"top":0.49960095,"width":0.018118352,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Memory 2 (Kingston)","depth":15,"bounds":{"left":0.59607714,"top":0.528332,"width":0.03706782,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"9905789-161.A00G","depth":18,"bounds":{"left":0.59607714,"top":0.54588985,"width":0.03507314,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"32 GB","depth":18,"bounds":{"left":0.6371343,"top":0.54588985,"width":0.011469414,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"5600 MHz","depth":18,"bounds":{"left":0.65458775,"top":0.54588985,"width":0.018118352,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.59707445,"top":0.5969673,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Network","depth":16,"bounds":{"left":0.60538566,"top":0.5961692,"width":0.017121011,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":17,"bounds":{"left":0.73636967,"top":0.5961692,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"VBR-LAN1","depth":15,"bounds":{"left":0.59607714,"top":0.62250596,"width":0.019448139,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"192.168.0.242","depth":18,"bounds":{"left":0.59607714,"top":0.6400638,"width":0.02543218,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"1Gbps","depth":18,"bounds":{"left":0.6274933,"top":0.6400638,"width":0.012466756,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"MTU1500","depth":18,"bounds":{"left":0.6459442,"top":0.6400638,"width":0.017453458,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Mac Address1/Subnet mask","depth":15,"bounds":{"left":0.59607714,"top":0.6687949,"width":0.049867023,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"6c:1f:f7:56:6d:9a","depth":18,"bounds":{"left":0.59607714,"top":0.6863527,"width":0.03174867,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"255.255.255.0","depth":18,"bounds":{"left":0.63380986,"top":0.6863527,"width":0.02543218,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.44614363,"top":0.73743016,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Others","depth":16,"bounds":{"left":0.45445478,"top":0.7366321,"width":0.013962766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"UPS","depth":15,"bounds":{"left":0.44514626,"top":0.7629689,"width":0.008144947,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"US3000","depth":18,"bounds":{"left":0.44514626,"top":0.78052676,"width":0.014461436,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9181781141973017027
|
5239126457676028685
|
visual_change
|
accessibility
|
NULL
|
DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
New Tab
MikroTik · CRS304-4XG-IN
MikroTik · CRS304-4XG-IN
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
5.7
KB/s
18.8
KB/s
Files
Control Panel
Storage
App Center
Logs
Support
Task Manager
Universal Search
Music
Cloud Drives
Theater
Photos
Online Office
TextEdit
Virtual Machine
Downloads
DLNA
File Version Explorer
Security
Jellyfin-HT
SAN Manager
Vault
Snapshot
Comics
Sync & Backup
Control Panel
Search
Connection & Access
User Management
File Service
Device Connection
Domain/LDAP
Terminal
General
Hardware & Power
Time & Language
Network
Security
Indexing Service
Service
About
Update & Restore
General
Storage
Service
Device analysis
Device Name
DXP4800PLUS-B5F8
UGREENlink ID
-
System Version
1.14.1.0107
Device Owner
k****[EMAIL]
Device
Model
DXP4800 Plus
SN
EC752JJ12253B5F8
Warranty Expiration Date
-
Last boot time
2026-04-08 18:40:30
Power Time
17 days 01 hour 01 minute 36 seconds
Hardware
CPU
Intel(R) Pentium(R) Gold 8505
4400
5 Cores
6 Threads
68 °C
Memory 1 (Kingston)
9905789-161.A00G
32 GB
5600 MHz
Memory 2 (Kingston)
9905789-161.A00G
32 GB
5600 MHz
Network
VBR-LAN1
[IP_ADDRESS]
1Gbps
MTU1500
Mac Address1/Subnet mask
6c:1f:f7:56:6d:9a
[IP_ADDRESS]
Others
UPS
US3000...
|
NULL
|
|
47411
|
1004
|
16
|
2026-04-17T11:37:07.168362+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-17/1776 /Users/lukas/.screenpipe/data/data/2026-04-17/1776425827168_m2.jpg...
|
Firefox
|
Dashboard · Jiminny · Membrane — Work
|
1
|
console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505 console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505?element=%2Fconnectors%2F64a158e7d2605720d232e07b&aside=%2Fagent%2F69e21b571e4d92fd3b379d4c...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Workers | Datadog
Developers | HubSpot
Developers Workers | Datadog
Developers | HubSpot
Developers | HubSpot
Inbox (1,576) - [EMAIL] - Jiminny Mail
Inbox (1,576) - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
CloudWatch | eu-west-1
CloudWatch | eu-west-1
New Tab
New Tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
[JY-20692] Issue with reconnecting Zoho - Jira
[JY-20692] Issue with reconnecting Zoho - Jira
Jiminny
Jiminny
Auth Proxy
Auth Proxy
Dashboard · Jiminny · Membrane
Dashboard · Jiminny · Membrane
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Workspace: Jiminny
Jiminny
Search
⌘K
Dashboard
Dashboard
Explore
Explore
Activity
Activity
Settings
Settings
Docs
Docs
Logout
Version
2026-04-16
Connectors
Connectors
Zoho CRM
Zoho CRM
Public
Development
Development
Test
Test
Overview
Overview
Connector Configuration
Connector Configuration
Operations
Operations
Data Collections
Data Collections
Universal Data Models
Universal Data Models
Global Webhooks
Global Webhooks
Events
Events
Basic Info
Basic Info
Name
Zoho CRM
Key
zoho-crm
App
Zoho CRM Zoho CRM
Zoho CRM
Logo
https://static.integration.app/connectors/zoho-crm/logo.png
Zoho CRM
Implementation
Implementation
Multiple options
Multiple options
Common
Common
?
Connect via Membrane
Connect via Membrane
OAuth 2.0
OAuth 2.0
Add implementation option
Agent / How to disable Connect via Membrane
Agent / How to disable Connect via Membrane
Beta
How to disable Connect via Membrane
I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.
Could you clarify what you mean by "Connect via Membrane"? Are you referring to:
Disabling a specific connection
- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?
Disabling an integration
- turning off an entire integration in your workspace?
Disabling OAuth/authentication flow
- preventing users from connecting their accounts?
Disabling a specific action or flow
- turning off certain integration functionality?
Something else
- perhaps related to Membrane's connection management features?
Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.
What would you like to do?
Open Iframe Session Screen
Open Iframe Session Screen...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Workers | Datadog","depth":4,"bounds":{"left":0.00234375,"top":0.045138888,"width":0.0890625,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Developers | HubSpot","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":"Developers | HubSpot","depth":5,"bounds":{"left":0.015625,"top":0.09236111,"width":0.04453125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Inbox (1,576) - lukas.kovalik@jiminny.com - Jiminny Mail","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":"Inbox (1,576) - lukas.kovalik@jiminny.com - Jiminny Mail","depth":5,"bounds":{"left":0.015625,"top":0.12083333,"width":0.11445312,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"120216 is your HubSpot Log In Code - integration-account@jiminny.com - Jiminny Mail","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":"120216 is your HubSpot Log In Code - integration-account@jiminny.com - Jiminny Mail","depth":5,"bounds":{"left":0.015625,"top":0.14930555,"width":0.17734376,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | eu-west-1","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":"CloudWatch | eu-west-1","depth":5,"bounds":{"left":0.015625,"top":0.17777778,"width":0.048828125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","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":"New Tab","depth":5,"bounds":{"left":0.015625,"top":0.20625,"width":0.017578125,"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.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":"Configure SSH access to multiple environment - Engineering - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.23472223,"width":0.1515625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · 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":"fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.26319444,"width":0.17421874,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"[JY-20692] Issue with reconnecting Zoho - Jira","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-20692] Issue with reconnecting Zoho - Jira","depth":5,"bounds":{"left":0.015625,"top":0.29166666,"width":0.09726562,"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":"Auth Proxy","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":"Auth Proxy","depth":5,"bounds":{"left":0.015625,"top":0.34861112,"width":0.021875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Dashboard · Jiminny · Membrane","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":true},{"role":"AXStaticText","text":"Dashboard · Jiminny · Membrane","depth":5,"bounds":{"left":0.015625,"top":0.37708333,"width":0.06679688,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.07890625,"top":0.37361112,"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.39722222,"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":"Workspace: Jiminny","depth":10,"bounds":{"left":0.09609375,"top":0.047916666,"width":0.0265625,"height":0.05277778},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":12,"bounds":{"left":0.09921875,"top":0.088194445,"width":0.01484375,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Search","depth":10,"bounds":{"left":0.09765625,"top":0.10625,"width":0.0234375,"height":0.023611112},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"⌘K","depth":11,"bounds":{"left":0.11054687,"top":0.11388889,"width":0.00546875,"height":0.008333334},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Dashboard","depth":11,"bounds":{"left":0.09609375,"top":0.13541667,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Dashboard","depth":12,"bounds":{"left":0.09921875,"top":0.15833333,"width":0.0203125,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Explore","depth":11,"bounds":{"left":0.09609375,"top":0.17638889,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Explore","depth":12,"bounds":{"left":0.10234375,"top":0.19930555,"width":0.0140625,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Activity","depth":11,"bounds":{"left":0.09609375,"top":0.21736111,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Activity","depth":12,"bounds":{"left":0.10195313,"top":0.24027778,"width":0.01484375,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Settings","depth":11,"bounds":{"left":0.09609375,"top":0.25833333,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Settings","depth":12,"bounds":{"left":0.1015625,"top":0.28125,"width":0.015625,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Docs","depth":11,"bounds":{"left":0.09609375,"top":0.30833334,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Docs","depth":12,"bounds":{"left":0.10234375,"top":0.33125,"width":0.009375,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Logout","depth":10,"bounds":{"left":0.09609375,"top":0.9166667,"width":0.0265625,"height":0.038194444},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Version","depth":11,"bounds":{"left":0.10234375,"top":0.9673611,"width":0.0140625,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-16","depth":11,"bounds":{"left":0.0984375,"top":0.9791667,"width":0.021875,"height":0.009027778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Connectors","depth":18,"bounds":{"left":0.13125,"top":0.054166667,"width":0.030078124,"height":0.0125},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Connectors","depth":19,"bounds":{"left":0.13125,"top":0.054166667,"width":0.030078124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Zoho CRM","depth":18,"bounds":{"left":0.16914062,"top":0.054166667,"width":0.02734375,"height":0.0125},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Zoho CRM","depth":19,"bounds":{"left":0.16914062,"top":0.054166667,"width":0.02734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Public","depth":15,"bounds":{"left":0.21171875,"top":0.055555556,"width":0.013671875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXComboBox","text":"Development","depth":15,"bounds":{"left":0.23320313,"top":0.052083332,"width":0.056640625,"height":0.016666668},"value":"Development","help_text":"","role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Development","depth":17,"bounds":{"left":0.246875,"top":0.055555556,"width":0.029296875,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Test","depth":15,"bounds":{"left":0.6304687,"top":0.050694443,"width":0.03203125,"height":0.019444445},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Test","depth":16,"bounds":{"left":0.6449219,"top":0.054166667,"width":0.0109375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Overview","depth":20,"bounds":{"left":0.128125,"top":0.08194444,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Overview","depth":22,"bounds":{"left":0.1390625,"top":0.0875,"width":0.024609376,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Connector Configuration","depth":18,"bounds":{"left":0.128125,"top":0.11875,"width":0.07460938,"height":0.017361112},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Connector Configuration","depth":19,"bounds":{"left":0.1296875,"top":0.121527776,"width":0.06015625,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Operations","depth":20,"bounds":{"left":0.128125,"top":0.1388889,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Operations","depth":22,"bounds":{"left":0.1390625,"top":0.14444445,"width":0.028515626,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Data Collections","depth":20,"bounds":{"left":0.128125,"top":0.16319445,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Data Collections","depth":22,"bounds":{"left":0.1390625,"top":0.16875,"width":0.0421875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Universal Data Models","depth":20,"bounds":{"left":0.128125,"top":0.1875,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Universal Data Models","depth":22,"bounds":{"left":0.1390625,"top":0.19305556,"width":0.058203124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Global Webhooks","depth":20,"bounds":{"left":0.128125,"top":0.21180555,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Global Webhooks","depth":22,"bounds":{"left":0.1390625,"top":0.21736111,"width":0.0453125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Events","depth":20,"bounds":{"left":0.128125,"top":0.2361111,"width":0.07460938,"height":0.022916667},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Events","depth":22,"bounds":{"left":0.1390625,"top":0.24166666,"width":0.0171875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Basic Info","depth":17,"bounds":{"left":0.23398438,"top":0.09791667,"width":0.02578125,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Basic Info","depth":18,"bounds":{"left":0.23398438,"top":0.09861111,"width":0.02578125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Name","depth":18,"bounds":{"left":0.2296875,"top":0.1375,"width":0.015234375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Zoho CRM","depth":17,"bounds":{"left":0.2878906,"top":0.13125,"width":0.22695312,"height":0.025},"value":"Zoho CRM","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Key","depth":18,"bounds":{"left":0.2296875,"top":0.16944444,"width":0.009765625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"zoho-crm","depth":17,"bounds":{"left":0.2878906,"top":0.16319445,"width":0.22695312,"height":0.025},"value":"zoho-crm","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"App","depth":17,"bounds":{"left":0.2296875,"top":0.20277777,"width":0.010546875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXComboBox","text":"Zoho CRM Zoho CRM","depth":19,"bounds":{"left":0.2878906,"top":0.19513889,"width":0.2125,"height":0.027777778},"value":"Zoho CRM Zoho CRM","help_text":"","role_description":"combo box","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Zoho CRM","depth":20,"bounds":{"left":0.30507812,"top":0.20277777,"width":0.02734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logo","depth":18,"bounds":{"left":0.2296875,"top":0.23819445,"width":0.012890625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"https://static.integration.app/connectors/zoho-crm/logo.png","depth":17,"bounds":{"left":0.2878906,"top":0.23194444,"width":0.209375,"height":0.025},"value":"https://static.integration.app/connectors/zoho-crm/logo.png","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Zoho CRM","depth":18,"bounds":{"left":0.5015625,"top":0.23402777,"width":0.009375,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Implementation","depth":17,"bounds":{"left":0.23789063,"top":0.28958333,"width":0.041015625,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Implementation","depth":18,"bounds":{"left":0.23789063,"top":0.29097223,"width":0.041015625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Multiple options","depth":19,"bounds":{"left":0.4734375,"top":0.29097223,"width":0.041796874,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXCheckBox","text":"Multiple options","depth":18,"bounds":{"left":0.4542969,"top":0.29652777,"width":0.000390625,"height":0.00069444446},"help_text":"","role_description":"checkbox","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Common","depth":18,"bounds":{"left":0.24101563,"top":0.33541667,"width":0.023828125,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Common","depth":19,"bounds":{"left":0.24101563,"top":0.33680555,"width":0.023828125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"?","depth":19,"bounds":{"left":0.27382812,"top":0.33680555,"width":0.002734375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Connect via Membrane","depth":18,"bounds":{"left":0.24101563,"top":0.38125,"width":0.061328124,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Connect via Membrane","depth":19,"bounds":{"left":0.24101563,"top":0.3826389,"width":0.061328124,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"OAuth 2.0","depth":18,"bounds":{"left":0.24101563,"top":0.42708334,"width":0.0265625,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"OAuth 2.0","depth":19,"bounds":{"left":0.24101563,"top":0.42847222,"width":0.0265625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Add implementation option","depth":18,"bounds":{"left":0.23632812,"top":0.46319443,"width":0.08164062,"height":0.02638889},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Agent / How to disable Connect via Membrane","depth":12,"bounds":{"left":0.7207031,"top":0.05347222,"width":0.12226562,"height":0.014583333},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Agent / How to disable Connect via Membrane","depth":13,"bounds":{"left":0.7207031,"top":0.054166667,"width":0.12226562,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Beta","depth":13,"bounds":{"left":0.98125,"top":0.055555556,"width":0.01015625,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"How to disable Connect via Membrane","depth":19,"bounds":{"left":0.89335936,"top":0.09791667,"width":0.09296875,"height":0.011805556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.","depth":19,"bounds":{"left":0.70820314,"top":0.1388889,"width":0.24335937,"height":0.027083334},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Could you clarify what you mean by \"Connect via Membrane\"? Are you referring to:","depth":19,"bounds":{"left":0.70820314,"top":0.1736111,"width":0.215625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling a specific connection","depth":21,"bounds":{"left":0.71601564,"top":0.19375,"width":0.08242188,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?","depth":20,"bounds":{"left":0.71601564,"top":0.19375,"width":0.23789063,"height":0.027083334},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling an integration","depth":21,"bounds":{"left":0.71601564,"top":0.22569445,"width":0.0625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- turning off an entire integration in your workspace?","depth":20,"bounds":{"left":0.77851564,"top":0.22569445,"width":0.1375,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling OAuth/authentication flow","depth":21,"bounds":{"left":0.71601564,"top":0.24305555,"width":0.095703125,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- preventing users from connecting their accounts?","depth":20,"bounds":{"left":0.81171876,"top":0.24305555,"width":0.13398437,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling a specific action or flow","depth":21,"bounds":{"left":0.71601564,"top":0.26041666,"width":0.0890625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- turning off certain integration functionality?","depth":20,"bounds":{"left":0.80507815,"top":0.26041666,"width":0.1171875,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Something else","depth":21,"bounds":{"left":0.71601564,"top":0.2777778,"width":0.040625,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- perhaps related to Membrane's connection management features?","depth":20,"bounds":{"left":0.7566406,"top":0.2777778,"width":0.17773438,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.","depth":19,"bounds":{"left":0.70820314,"top":0.30347222,"width":0.24335937,"height":0.027083334},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"","depth":15,"bounds":{"left":0.70625,"top":0.9076389,"width":0.28203124,"height":0.022222223},"value":"","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"What would you like to do?","depth":16,"bounds":{"left":0.70625,"top":0.90902776,"width":0.06992187,"height":0.0125},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Open Iframe Session Screen","depth":15,"bounds":{"left":0.8035156,"top":0.97083336,"width":0.0875,"height":0.022222223},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Open Iframe Session Screen","depth":17,"bounds":{"left":0.82070315,"top":0.9770833,"width":0.0640625,"height":0.010416667},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9181661591257973978
|
-8423896198590911963
|
visual_change
|
accessibility
|
NULL
|
Workers | Datadog
Developers | HubSpot
Developers Workers | Datadog
Developers | HubSpot
Developers | HubSpot
Inbox (1,576) - [EMAIL] - Jiminny Mail
Inbox (1,576) - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
CloudWatch | eu-west-1
CloudWatch | eu-west-1
New Tab
New Tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
[JY-20692] Issue with reconnecting Zoho - Jira
[JY-20692] Issue with reconnecting Zoho - Jira
Jiminny
Jiminny
Auth Proxy
Auth Proxy
Dashboard · Jiminny · Membrane
Dashboard · Jiminny · Membrane
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Workspace: Jiminny
Jiminny
Search
⌘K
Dashboard
Dashboard
Explore
Explore
Activity
Activity
Settings
Settings
Docs
Docs
Logout
Version
2026-04-16
Connectors
Connectors
Zoho CRM
Zoho CRM
Public
Development
Development
Test
Test
Overview
Overview
Connector Configuration
Connector Configuration
Operations
Operations
Data Collections
Data Collections
Universal Data Models
Universal Data Models
Global Webhooks
Global Webhooks
Events
Events
Basic Info
Basic Info
Name
Zoho CRM
Key
zoho-crm
App
Zoho CRM Zoho CRM
Zoho CRM
Logo
https://static.integration.app/connectors/zoho-crm/logo.png
Zoho CRM
Implementation
Implementation
Multiple options
Multiple options
Common
Common
?
Connect via Membrane
Connect via Membrane
OAuth 2.0
OAuth 2.0
Add implementation option
Agent / How to disable Connect via Membrane
Agent / How to disable Connect via Membrane
Beta
How to disable Connect via Membrane
I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.
Could you clarify what you mean by "Connect via Membrane"? Are you referring to:
Disabling a specific connection
- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?
Disabling an integration
- turning off an entire integration in your workspace?
Disabling OAuth/authentication flow
- preventing users from connecting their accounts?
Disabling a specific action or flow
- turning off certain integration functionality?
Something else
- perhaps related to Membrane's connection management features?
Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.
What would you like to do?
Open Iframe Session Screen
Open Iframe Session Screen...
|
NULL
|
|
47412
|
1003
|
9
|
2026-04-17T11:37:07.512933+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-17/1776 /Users/lukas/.screenpipe/data/data/2026-04-17/1776425827512_m1.jpg...
|
Firefox
|
Dashboard · Jiminny · Membrane — Work
|
1
|
console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505 console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505?element=%2Fconnectors%2F64a158e7d2605720d232e07b&aside=%2Fagent%2F69e21b571e4d92fd3b379d4c...
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Workers | Datadog
Developers | HubSpot
Developers Workers | Datadog
Developers | HubSpot
Developers | HubSpot
Inbox (1,576) - [EMAIL] - Jiminny Mail
Inbox (1,576) - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
CloudWatch | eu-west-1
CloudWatch | eu-west-1
New Tab
New Tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
[JY-20692] Issue with reconnecting Zoho - Jira
[JY-20692] Issue with reconnecting Zoho - Jira
Jiminny
Jiminny
Auth Proxy
Auth Proxy
Dashboard · Jiminny · Membrane
Dashboard · Jiminny · Membrane
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Workspace: Jiminny
Jiminny
Search
⌘K
Dashboard
Dashboard
Explore
Explore
Activity
Activity
Settings
Settings
Docs
Docs
Logout
Version
2026-04-16
Connectors
Connectors
Zoho CRM
Zoho CRM
Public
Development
Development
Test
Test
Overview
Overview
Connector Configuration
Connector Configuration
Operations
Operations
Data Collections
Data Collections
Universal Data Models
Universal Data Models
Global Webhooks
Global Webhooks
Events
Events
Basic Info
Basic Info
Name
Zoho CRM
Key
zoho-crm
App
Zoho CRM Zoho CRM
Zoho CRM
Logo
https://static.integration.app/connectors/zoho-crm/logo.png
Zoho CRM
Implementation
Implementation
Multiple options
Multiple options
Common
Common
?
Connect via Membrane
Connect via Membrane
OAuth 2.0
OAuth 2.0
Add implementation option
Agent / How to disable Connect via Membrane
Agent / How to disable Connect via Membrane
Beta
How to disable Connect via Membrane
I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.
Could you clarify what you mean by "Connect via Membrane"? Are you referring to:
Disabling a specific connection
- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?
Disabling an integration
- turning off an entire integration in your workspace?
Disabling OAuth/authentication flow
- preventing users from connecting their accounts?
Disabling a specific action or flow
- turning off certain integration functionality?
Something else
- perhaps related to Membrane's connection management features?
Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.
What would you like to do?
Open Iframe Session Screen
Open Iframe Session Screen...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Workers | Datadog","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Developers | HubSpot","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Developers | HubSpot","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Inbox (1,576) - lukas.kovalik@jiminny.com - Jiminny Mail","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Inbox (1,576) - lukas.kovalik@jiminny.com - Jiminny Mail","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"120216 is your HubSpot Log In Code - integration-account@jiminny.com - Jiminny Mail","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"120216 is your HubSpot Log In Code - integration-account@jiminny.com - Jiminny Mail","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"CloudWatch | eu-west-1","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"CloudWatch | eu-west-1","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"New Tab","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Configure SSH access to multiple environment - Engineering - Confluence","depth":4,"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,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"[JY-20692] Issue with reconnecting Zoho - Jira","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"[JY-20692] Issue with reconnecting Zoho - Jira","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Auth Proxy","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Auth Proxy","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Dashboard · Jiminny · Membrane","depth":4,"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Dashboard · Jiminny · Membrane","depth":5,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"New Tab","depth":4,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"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,"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,"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,"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,"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Workspace: Jiminny","depth":10,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Jiminny","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Search","depth":10,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"⌘K","depth":11,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Dashboard","depth":11,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Dashboard","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Explore","depth":11,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Explore","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Activity","depth":11,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Activity","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Settings","depth":11,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Settings","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Docs","depth":11,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Docs","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Logout","depth":10,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Version","depth":11,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026-04-16","depth":11,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Connectors","depth":18,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Connectors","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Zoho CRM","depth":18,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Zoho CRM","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Public","depth":15,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXComboBox","text":"Development","depth":15,"value":"Development","help_text":"","role_description":"combo box","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Development","depth":17,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Test","depth":15,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Test","depth":16,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Overview","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Overview","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Connector Configuration","depth":18,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Connector Configuration","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Operations","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Operations","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Data Collections","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Data Collections","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Universal Data Models","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Universal Data Models","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Global Webhooks","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Global Webhooks","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Events","depth":20,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Events","depth":22,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Basic Info","depth":17,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Basic Info","depth":18,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Name","depth":18,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Zoho CRM","depth":17,"value":"Zoho CRM","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Key","depth":18,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"zoho-crm","depth":17,"value":"zoho-crm","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"App","depth":17,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXComboBox","text":"Zoho CRM Zoho CRM","depth":19,"value":"Zoho CRM Zoho CRM","help_text":"","role_description":"combo box","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Zoho CRM","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logo","depth":18,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"https://static.integration.app/connectors/zoho-crm/logo.png","depth":17,"value":"https://static.integration.app/connectors/zoho-crm/logo.png","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Zoho CRM","depth":18,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Implementation","depth":17,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Implementation","depth":18,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Multiple options","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXCheckBox","text":"Multiple options","depth":18,"help_text":"","role_description":"checkbox","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Common","depth":18,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Common","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"?","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"Connect via Membrane","depth":18,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Connect via Membrane","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXHeading","text":"OAuth 2.0","depth":18,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"OAuth 2.0","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Add implementation option","depth":18,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Agent / How to disable Connect via Membrane","depth":12,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Agent / How to disable Connect via Membrane","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Beta","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"How to disable Connect via Membrane","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Could you clarify what you mean by \"Connect via Membrane\"? Are you referring to:","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling a specific connection","depth":21,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling an integration","depth":21,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- turning off an entire integration in your workspace?","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling OAuth/authentication flow","depth":21,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- preventing users from connecting their accounts?","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Disabling a specific action or flow","depth":21,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- turning off certain integration functionality?","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Something else","depth":21,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"- perhaps related to Membrane's connection management features?","depth":20,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.","depth":19,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"","depth":15,"value":"","help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"What would you like to do?","depth":16,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Open Iframe Session Screen","depth":15,"bounds":{"left":1.0,"top":0.0,"width":-0.013888836,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Open Iframe Session Screen","depth":17,"bounds":{"left":1.0,"top":0.0,"width":-0.04444444,"height":0.016666668},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9181661591257973978
|
-8423896198590911963
|
idle
|
accessibility
|
NULL
|
Workers | Datadog
Developers | HubSpot
Developers Workers | Datadog
Developers | HubSpot
Developers | HubSpot
Inbox (1,576) - [EMAIL] - Jiminny Mail
Inbox (1,576) - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
120216 is your HubSpot Log In Code - [EMAIL] - Jiminny Mail
CloudWatch | eu-west-1
CloudWatch | eu-west-1
New Tab
New Tab
Configure SSH access to multiple environment - Engineering - Confluence
Configure SSH access to multiple environment - Engineering - Confluence
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
fix-cache-for-business-processes by ilian-jiminny · Pull Request #11985 · jiminny/app
[JY-20692] Issue with reconnecting Zoho - Jira
[JY-20692] Issue with reconnecting Zoho - Jira
Jiminny
Jiminny
Auth Proxy
Auth Proxy
Dashboard · Jiminny · Membrane
Dashboard · Jiminny · Membrane
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Workspace: Jiminny
Jiminny
Search
⌘K
Dashboard
Dashboard
Explore
Explore
Activity
Activity
Settings
Settings
Docs
Docs
Logout
Version
2026-04-16
Connectors
Connectors
Zoho CRM
Zoho CRM
Public
Development
Development
Test
Test
Overview
Overview
Connector Configuration
Connector Configuration
Operations
Operations
Data Collections
Data Collections
Universal Data Models
Universal Data Models
Global Webhooks
Global Webhooks
Events
Events
Basic Info
Basic Info
Name
Zoho CRM
Key
zoho-crm
App
Zoho CRM Zoho CRM
Zoho CRM
Logo
https://static.integration.app/connectors/zoho-crm/logo.png
Zoho CRM
Implementation
Implementation
Multiple options
Multiple options
Common
Common
?
Connect via Membrane
Connect via Membrane
OAuth 2.0
OAuth 2.0
Add implementation option
Agent / How to disable Connect via Membrane
Agent / How to disable Connect via Membrane
Beta
How to disable Connect via Membrane
I'd be happy to help you disable Connect via Membrane! However, I need a bit more context to give you the most accurate answer.
Could you clarify what you mean by "Connect via Membrane"? Are you referring to:
Disabling a specific connection
- removing a customer's connection to an external app (like Stripe, Salesforce, etc.)?
Disabling an integration
- turning off an entire integration in your workspace?
Disabling OAuth/authentication flow
- preventing users from connecting their accounts?
Disabling a specific action or flow
- turning off certain integration functionality?
Something else
- perhaps related to Membrane's connection management features?
Once you clarify, I can provide you with the specific steps or code needed to accomplish what you're looking for.
What would you like to do?
Open Iframe Session Screen
Open Iframe Session Screen...
|
NULL
|
|
79559
|
2066
|
1
|
2026-04-24T16:35:10.389975+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-24/1777 /Users/lukas/.screenpipe/data/data/2026-04-24/1777048510389_m2.jpg...
|
PhpStorm
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
codeselectionViewlerminalWindowmelpV SCREENPIPE [S codeselectionViewlerminalWindowmelpV SCREENPIPE [SSH: NAS]#reeycle> app>datapipes(0 app_settings.jsonE archive.dbE db.saliteE db.salite-shmE db.salite-wals screenpipesync.shE screenpipe.dbx Release Notes: 1.117.0 XVisual Studio Code 1.117Show release notes after an updateFollow us on Linkedin, X. Bluesky View onlineRelease date: April 22, 2026Welcomerorne aur relcaseo vsuar udo coder nisreleaseadosnew capaomuest on copllo nterorseand Busnessuusersand unner morovest neragentexperience in Vs Code, Mere are the hiahlichis tor this release:• 3YOk tor Business and enterprise: Connect vour own AP. kevs tor preterred or specialized models directiv in Vs Code chat.•Incremental chat renderina: Experience more fluid streamina of chat responses.• Terminal improvements: Launch Copilot Cl from anv terminal profileHapoy Coding.Vs Code is rolling out gradually to all users. Use Check tor Updates in VS Code to get the latest version immediately.To trv new features as soon as possible, download the niahtlv Insiders build, which includes the latest updates as soon as they are availableIN THIS UPDATEBrina vour own kev for Cooilot Business and EnteroriseGitliub ConilotChat experienceTeams often need specific models for compliance, performance, or cost reasons, but switching between tools to use them slowsdevelopers down. Bring your own language model key (BYOK) lets Copilot Business and Enterprise users connect their own API keysfor providers like OpenRouter, Ollama, Google, OpenAl, and more, so they can use those models directly in VS Code chat.Agent experienceBy default, BYOK is enabled and administrators can disable it with the Bring Your Own Language Model Key policy in the Copilotlerminapolicy settings on GitHub.com. This gives administrators control over which model providers are available to their organization whileLanquadeskeeping developers in their existing workflow.Deprecated featuresAfter the policy is enabled, organization members can add models from built-in providers or install language model providerand settingsThank vouChat experienceIncremental rendering of chat responses (Experimental)Chat responses feel more fluid and natural with incremental rendering, which streams content block-by-block with optional animationsas tokens arrive. Instead of the default timer-based renderina, this experimental approach renders each block as it becomes ready.reducing the verceived wait time tor longer responsesConfigure incremental response renderina with the following settings• chat experimental increentalRenderina. enabled • Enable or disable incremental response rendering with.ontionall hlock-level animation when streamina chat resnonses. Default. +rue)•@ chat.experimental.incrementalRendering.animationStyle : Configure the animation style for incrementalOUTIINE> TIMELINESSH: nas@0A0 040100% LzFri 24 Apr 19:35:100 000*0&.* Adm1n@DXP4800PLUS-B5F8:/... XAdm1n@DXP4800PLUS-B5F8:/volume1/add ait.Ihave created qitea repo hitos:citea.com/akvlak/screenoipe.aft• Bash Fix safe.directory, add remote, stage filestacond enha tad lsa er redoryvo lmeVisareeno ne arad/vn lmeVisareenn ne remote addloaain hasa laea com dlaky lak sareenn ne arasaraw imevsareenn ine adoul on branch masterNo commits yetThinking >• ne #recvcle tolder gor staged — the # in ,citianore is treated as a comment. Let me tix that and unstage It:• Edit .gitignore# Synology# Synology•жrecycle•#recycledeaD1rdead1r• Bash Unstade the recvcle bin file--cached "#recycle/desktop.ini" && git statusrmI#recvcle/deskton.inf• Bash Create initial commitgit add .gitignore && git commit -m "S(cat <<'EOF'Iniclal commit - screenpipe dashboard app, sync script, and pipesmit) b99c17el Initial commit - screenpipe dashboard app, sync script, and pipes• Now oush — vou'll need vour Gitea credentialsait nush -u oriain mastenIt will prompt for your Gitea username and password (or token if you have 2FA). If you want to avoid re-entering credentials each time, set up a token once:ai+remote cet_url_oriain httne.//[EMAIL]/lakvlak/screennine.aitEce to focuc or unfocuc Claude+00‹> Edit automatically&& Signed out...
|
NULL
|
-9181543611048143646
|
NULL
|
idle
|
ocr
|
NULL
|
codeselectionViewlerminalWindowmelpV SCREENPIPE [S codeselectionViewlerminalWindowmelpV SCREENPIPE [SSH: NAS]#reeycle> app>datapipes(0 app_settings.jsonE archive.dbE db.saliteE db.salite-shmE db.salite-wals screenpipesync.shE screenpipe.dbx Release Notes: 1.117.0 XVisual Studio Code 1.117Show release notes after an updateFollow us on Linkedin, X. Bluesky View onlineRelease date: April 22, 2026Welcomerorne aur relcaseo vsuar udo coder nisreleaseadosnew capaomuest on copllo nterorseand Busnessuusersand unner morovest neragentexperience in Vs Code, Mere are the hiahlichis tor this release:• 3YOk tor Business and enterprise: Connect vour own AP. kevs tor preterred or specialized models directiv in Vs Code chat.•Incremental chat renderina: Experience more fluid streamina of chat responses.• Terminal improvements: Launch Copilot Cl from anv terminal profileHapoy Coding.Vs Code is rolling out gradually to all users. Use Check tor Updates in VS Code to get the latest version immediately.To trv new features as soon as possible, download the niahtlv Insiders build, which includes the latest updates as soon as they are availableIN THIS UPDATEBrina vour own kev for Cooilot Business and EnteroriseGitliub ConilotChat experienceTeams often need specific models for compliance, performance, or cost reasons, but switching between tools to use them slowsdevelopers down. Bring your own language model key (BYOK) lets Copilot Business and Enterprise users connect their own API keysfor providers like OpenRouter, Ollama, Google, OpenAl, and more, so they can use those models directly in VS Code chat.Agent experienceBy default, BYOK is enabled and administrators can disable it with the Bring Your Own Language Model Key policy in the Copilotlerminapolicy settings on GitHub.com. This gives administrators control over which model providers are available to their organization whileLanquadeskeeping developers in their existing workflow.Deprecated featuresAfter the policy is enabled, organization members can add models from built-in providers or install language model providerand settingsThank vouChat experienceIncremental rendering of chat responses (Experimental)Chat responses feel more fluid and natural with incremental rendering, which streams content block-by-block with optional animationsas tokens arrive. Instead of the default timer-based renderina, this experimental approach renders each block as it becomes ready.reducing the verceived wait time tor longer responsesConfigure incremental response renderina with the following settings• chat experimental increentalRenderina. enabled • Enable or disable incremental response rendering with.ontionall hlock-level animation when streamina chat resnonses. Default. +rue)•@ chat.experimental.incrementalRendering.animationStyle : Configure the animation style for incrementalOUTIINE> TIMELINESSH: nas@0A0 040100% LzFri 24 Apr 19:35:100 000*0&.* Adm1n@DXP4800PLUS-B5F8:/... XAdm1n@DXP4800PLUS-B5F8:/volume1/add ait.Ihave created qitea repo hitos:citea.com/akvlak/screenoipe.aft• Bash Fix safe.directory, add remote, stage filestacond enha tad lsa er redoryvo lmeVisareeno ne arad/vn lmeVisareenn ne remote addloaain hasa laea com dlaky lak sareenn ne arasaraw imevsareenn ine adoul on branch masterNo commits yetThinking >• ne #recvcle tolder gor staged — the # in ,citianore is treated as a comment. Let me tix that and unstage It:• Edit .gitignore# Synology# Synology•жrecycle•#recycledeaD1rdead1r• Bash Unstade the recvcle bin file--cached "#recycle/desktop.ini" && git statusrmI#recvcle/deskton.inf• Bash Create initial commitgit add .gitignore && git commit -m "S(cat <<'EOF'Iniclal commit - screenpipe dashboard app, sync script, and pipesmit) b99c17el Initial commit - screenpipe dashboard app, sync script, and pipes• Now oush — vou'll need vour Gitea credentialsait nush -u oriain mastenIt will prompt for your Gitea username and password (or token if you have 2FA). If you want to avoid re-entering credentials each time, set up a token once:ai+remote cet_url_oriain httne.//[EMAIL]/lakvlak/screennine.aitEce to focuc or unfocuc Claude+00‹> Edit automatically&& Signed out...
|
79557
|
|
19933
|
427
|
32
|
2026-04-15T08:15:08.368935+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776240908368_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShelllEditViewSessionScriptsProfilesWindowHe iTerm2ShelllEditViewSessionScriptsProfilesWindowHelpSupport Daily - in 3 h 45 mWed 15 Apr 11:15:08-zshDOCKER₴1DEV (-zsh)2026-04-15T11:07:53.988063ZINFO2026-04-15T11:08:06.0388617INFO2026-04-15T11:08:09.055682ZINFO2026-04-15T11:08:12.063039ZINFO2026-04-15T11:08:15.073228ZINFO2026-04-15T11:08:18.102250ZINFO2026-04-15T11:08:24.125079ZINFO2026-04-15T11:08:27.142561ZINFO2026-04-15T11:08:30.160039ZINFO2026-44-1513:48:33115x9977INFO2026-04-15711:08:39.213493ZINFO2026-04-15T11:08:42..212553ZINFO2026-04-15T11:08:48.227847ZINFO2026-04-15111:08:51.223241ZINFO2026-04-15T11:08:54.242421ZINFO2026-04-15T11:08:57.252710ZINFO2026-04-15T11:09:00.240929ZINFO2026-04-15T11:09:15.385940ZINFO2026-04-15T11:10:57.823228ZINFO2026-04-15T11:11:01.128119ZINFO2026-04-15T11:11:03.253045ZINFO2026-04-15T11:11:44.335449ZINFO2026-04-15T11:11:53.358963ZINFO2026-04-15T11:12:14.518264ZINFO2026-04-15T11:12:32.627745ZINFO2026-04-15T11:12:38.657036ZINFO2026-04-15T11:12:41.6937737INFO2026-04-15T11:12:56.821347ZINFO2026-04-15T11:13:22.218666ZINFO2026-04-15T11:13:25.234157ZINFO2026-04-15T11:13:28.275545ZINFO2026-04-15T11:13:31.249107ZINFO2026-04-15T11:13:37.267054ZINFO2026-04-15T11:13:52.078701ZINFO2026-04-15T11:14:01.554914ZINFO2026-04-15T11:14:16.198859ZINFO2026-04-15T11:14:40.356451ZINFO2026-04-15T11:14:41.245504ZINFO2026-04-15T11:14:43.429041ZINFO2026-04-15T11:14:56.227312ZINFO2026-04-15T11:14:59.796873ZINFO2026-04-15T11:15:02.837276ZINFO2026-04-15T11:15:05.103209ZINFO2026-04-15T11:15:05.106213ZINFOAPP (-zsh)ec2-user@ip-10--zsh85-zsh87* Unable to a..О 88-zshscreenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1screenpipe_engine::event_driven_capture:(hash=8307268239499417024, trigger=visual_change)contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1(hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1(hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitorforChash=1104374563302764275,screenpipe_engine::event.driven_capture:contentdedup:skippingcapturemonitor 1 (hash=1104374563302764275,trigger=visual_change)trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1 Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1 (hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skippingcaptureforChash=1104374563302764275,trigger=visual_change)monitor1screenpipe_engine::event_driven_capture: contentdedup:skippingcaptureformonitor1Chash=1104374563302764275,trigger=visual_change)Chash=1104374563302764275,trigger=visual_change)screenpipe_engine:: event,_driven_capture:contentdedup:skippingcapture formonitor1screenpipe_engine:: event,_driven_capture:contentdedup:Chash=1104374563302764275,trigger=visual_change)skippingcapture for monitor 1 (hash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitorscreenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,(hash=1104374563302764275,trigger=visual_change)trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1screenpipe_engine::snapshot_compaction: snapshotcompaction: found 64eligible framesChash=1924577345932199660,trigger=visual_change)screenpipe_engine::snapshot_compaction:snapshotcompaction: 35 frames, 6.8MB → 3.2MB (2.1x), 35 JPEGS deletedscreenpipe_engine::snapshot_compaction: snapshotcompaction: 27 frames, 4.7MBscreenpipe_engine::event_driven_capture:contentdedup:1.3MB (3.7x), 27 JPEGs deletedskipping capture for monitor 1 (hash=-3997107610967558921, trigger=visual_change)screenpipe_engine::event_driven_capture: content dedup:skipping capture for monitor 1 (hash=-3997107610967558921, trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 1 Chash=-7951985222042474937,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup: skippingscreenpipe_engine:: event._driven_capture:contentdedup:skippingcapture for monitor 1 (hash=-7951985222042474937,trigger=visual_change)screenpipe_engine::event_driven_capture:capture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)contentdedup:skippingcapture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 2 Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 (hash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 2 Chash=-1812041036173187287,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 1 (hash=-1812041036173187287,trigger=visual_change)screenpipe_engine::event_driven_capture:content dedup:skipping capture for monitor 2 (hash=-1812041036173187287,screenpipe_engine::event_driven_capture: contentdedup:dedup:skipping capture for monitor 1 (hash=-1812041036173187287,trigger=visual_change)trigger=visual_change)screenpipe_engine:: event_driven_capture: contentskippingcapture for monitor 1(hash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 (hash=-5649982975316378258,screenpipe_engine::event_driven_capture: contenttrigger=visual_change)dedup:skippingcapture for monitor 1 (hash=-5649982975316378258, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1 (hash=7688213624918280381, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingscreenpipe_engine::event_driven_capture:contentdedup:capture for monitor 2 (hash=7688213624918280381, trigger=visual_change)skippingcapture for monitor 2 (hash=7688213624918280381,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 2 (hash=7688213624918280381,trigger=click)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 1 (hash=7688213624918280381,trigger=click)...
|
NULL
|
-9181364500608101216
|
NULL
|
visual_change
|
ocr
|
NULL
|
iTerm2ShelllEditViewSessionScriptsProfilesWindowHe iTerm2ShelllEditViewSessionScriptsProfilesWindowHelpSupport Daily - in 3 h 45 mWed 15 Apr 11:15:08-zshDOCKER₴1DEV (-zsh)2026-04-15T11:07:53.988063ZINFO2026-04-15T11:08:06.0388617INFO2026-04-15T11:08:09.055682ZINFO2026-04-15T11:08:12.063039ZINFO2026-04-15T11:08:15.073228ZINFO2026-04-15T11:08:18.102250ZINFO2026-04-15T11:08:24.125079ZINFO2026-04-15T11:08:27.142561ZINFO2026-04-15T11:08:30.160039ZINFO2026-44-1513:48:33115x9977INFO2026-04-15711:08:39.213493ZINFO2026-04-15T11:08:42..212553ZINFO2026-04-15T11:08:48.227847ZINFO2026-04-15111:08:51.223241ZINFO2026-04-15T11:08:54.242421ZINFO2026-04-15T11:08:57.252710ZINFO2026-04-15T11:09:00.240929ZINFO2026-04-15T11:09:15.385940ZINFO2026-04-15T11:10:57.823228ZINFO2026-04-15T11:11:01.128119ZINFO2026-04-15T11:11:03.253045ZINFO2026-04-15T11:11:44.335449ZINFO2026-04-15T11:11:53.358963ZINFO2026-04-15T11:12:14.518264ZINFO2026-04-15T11:12:32.627745ZINFO2026-04-15T11:12:38.657036ZINFO2026-04-15T11:12:41.6937737INFO2026-04-15T11:12:56.821347ZINFO2026-04-15T11:13:22.218666ZINFO2026-04-15T11:13:25.234157ZINFO2026-04-15T11:13:28.275545ZINFO2026-04-15T11:13:31.249107ZINFO2026-04-15T11:13:37.267054ZINFO2026-04-15T11:13:52.078701ZINFO2026-04-15T11:14:01.554914ZINFO2026-04-15T11:14:16.198859ZINFO2026-04-15T11:14:40.356451ZINFO2026-04-15T11:14:41.245504ZINFO2026-04-15T11:14:43.429041ZINFO2026-04-15T11:14:56.227312ZINFO2026-04-15T11:14:59.796873ZINFO2026-04-15T11:15:02.837276ZINFO2026-04-15T11:15:05.103209ZINFO2026-04-15T11:15:05.106213ZINFOAPP (-zsh)ec2-user@ip-10--zsh85-zsh87* Unable to a..О 88-zshscreenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1screenpipe_engine::event_driven_capture:(hash=8307268239499417024, trigger=visual_change)contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1(hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1(hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitorforChash=1104374563302764275,screenpipe_engine::event.driven_capture:contentdedup:skippingcapturemonitor 1 (hash=1104374563302764275,trigger=visual_change)trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapturefor monitor 1 Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1 (hash=1104374563302764275, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1screenpipe_engine::event_driven_capture:contentdedup:skippingcaptureformonitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skippingcaptureforChash=1104374563302764275,trigger=visual_change)monitor1screenpipe_engine::event_driven_capture: contentdedup:skippingcaptureformonitor1Chash=1104374563302764275,trigger=visual_change)Chash=1104374563302764275,trigger=visual_change)screenpipe_engine:: event,_driven_capture:contentdedup:skippingcapture formonitor1screenpipe_engine:: event,_driven_capture:contentdedup:Chash=1104374563302764275,trigger=visual_change)skippingcapture for monitor 1 (hash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitorscreenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,(hash=1104374563302764275,trigger=visual_change)trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1Chash=1104374563302764275,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1screenpipe_engine::snapshot_compaction: snapshotcompaction: found 64eligible framesChash=1924577345932199660,trigger=visual_change)screenpipe_engine::snapshot_compaction:snapshotcompaction: 35 frames, 6.8MB → 3.2MB (2.1x), 35 JPEGS deletedscreenpipe_engine::snapshot_compaction: snapshotcompaction: 27 frames, 4.7MBscreenpipe_engine::event_driven_capture:contentdedup:1.3MB (3.7x), 27 JPEGs deletedskipping capture for monitor 1 (hash=-3997107610967558921, trigger=visual_change)screenpipe_engine::event_driven_capture: content dedup:skipping capture for monitor 1 (hash=-3997107610967558921, trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 1 Chash=-7951985222042474937,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup: skippingscreenpipe_engine:: event._driven_capture:contentdedup:skippingcapture for monitor 1 (hash=-7951985222042474937,trigger=visual_change)screenpipe_engine::event_driven_capture:capture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)contentdedup:skippingcapture for monitor 1 (hash=-7951985222042474937, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 2 Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 (hash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 Chash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 2 Chash=-1812041036173187287,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 1 (hash=-1812041036173187287,trigger=visual_change)screenpipe_engine::event_driven_capture:content dedup:skipping capture for monitor 2 (hash=-1812041036173187287,screenpipe_engine::event_driven_capture: contentdedup:dedup:skipping capture for monitor 1 (hash=-1812041036173187287,trigger=visual_change)trigger=visual_change)screenpipe_engine:: event_driven_capture: contentskippingcapture for monitor 1(hash=-5649982975316378258,trigger=visual_change)screenpipe_engine::event_driven_capture: contentdedup:skipping capture for monitor 2 (hash=-5649982975316378258,screenpipe_engine::event_driven_capture: contenttrigger=visual_change)dedup:skippingcapture for monitor 1 (hash=-5649982975316378258, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingcapture for monitor 1 (hash=7688213624918280381, trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skippingscreenpipe_engine::event_driven_capture:contentdedup:capture for monitor 2 (hash=7688213624918280381, trigger=visual_change)skippingcapture for monitor 2 (hash=7688213624918280381,trigger=visual_change)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 2 (hash=7688213624918280381,trigger=click)screenpipe_engine::event_driven_capture:contentdedup:skipping capture for monitor 1 (hash=7688213624918280381,trigger=click)...
|
NULL
|
|
27224
|
570
|
72
|
2026-04-15T13:44:15.954789+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776260655954_m2.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
5521849361631955163/180Imperial Age--Capped Ram Cr 5521849361631955163/180Imperial Age--Capped Ram Created----Trebuchet (Packed) Created---Scout Cavalry Created----House Built-Game Paused (P)Click to select this building.5 Magnus Olafsson: 22912/229121 kovaliklukas: 19288/192888 Almish Yiltawar: 18153/18153ON2 Rajyapala: 17992/17992NV6 László I: 12293/12293NE Maximilian of Habsbung: 676016760 H IV4 Louls VI: 6904/6394 3 IV2 Huascán: 6223/6223 H TV...
|
NULL
|
-9181238571986405783
|
NULL
|
visual_change
|
ocr
|
NULL
|
5521849361631955163/180Imperial Age--Capped Ram Cr 5521849361631955163/180Imperial Age--Capped Ram Created----Trebuchet (Packed) Created---Scout Cavalry Created----House Built-Game Paused (P)Click to select this building.5 Magnus Olafsson: 22912/229121 kovaliklukas: 19288/192888 Almish Yiltawar: 18153/18153ON2 Rajyapala: 17992/17992NV6 László I: 12293/12293NE Maximilian of Habsbung: 676016760 H IV4 Louls VI: 6904/6394 3 IV2 Huascán: 6223/6223 H TV...
|
NULL
|
|
17229
|
374
|
10
|
2026-04-14T15:41:52.484238+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776181312484_m1.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackFileEditViewGoHistoryWindowHelpED→Search Jim +SlackFileEditViewGoHistoryWindowHelpED→Search Jiminny IncHomeDMsActivityFilesLaterJiminny ...sos+# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Aneliya Angelova, ...86 0• MessagesAdd canvasO Files+предполагчямаме в шрифта наTodayПДФ-а. Не-, рен какво да гиправя?@Nikolay Yankov, някой от горните ли имашпредвид или трето? (edited)Nikolay Yankov 4:09 PMпоследния дето пратих..•Steliyan Georgiev 4:09 PMда, за него говоря и азNikolay Yankov 4:10 PMможе би да ги скипваме такива emojis* 1MoreDirect messagesAneliya Angelova, ...Vasil Vasilevда не пречат на процесването и отговораSteliyan GeorgievAdelina Petrova, Ili...P. Adelina Petrova% Galya DimitrovaRs Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...Steliyan Georgiev 4:10 PMне сьм много сигурен какLukas Kovalik 5:41 PMсега ще го добавя това за disable on expired,после може да се тества по сьщия начинкато генериране сьс сьщата командаH1Newi: AppsNikolay Yankov 6:14 PMпушнах фикса за delete да маха реда отраблицатаJira Cloud+ToastMessage Aneliya Angelova, Nikolay Yankov, Steli...Google Cale...+(lol14Activity MonitorAll ProcessesProcess NameBoosteroidFirefoxCP Isolated Web ContentWindowServerFirefoxFirefoxFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentCursorUlViewService (Not Responding)Notion Calendar Helper (Renderer)VTDecoderXPCServiceFirefox GPU HelperFirefox GPU HelperSlack Helper (Renderer)Notion Helper (Renderer)FirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentclaudeMEMORY PRESSUREMem...2,01 GB1,18 GB985,1 MB886,2 MB770,2 MB768,3 MB734,4 MB732,7 MB636,9 MB603,0 MB592,8 MB547,1 MB541,6 MB539,0 MB511,4 MB484,4 MB475,3 MB449,7 MB417,8 MB383,7 MB382,0 MB380,2 MB372,8 MB341,8 MB335,6 MB321,1 MB278,9 MB277,9 MBPhysical Memory:Memory Used:Cached Files:Swap Used:100% <47Tue 14 Apr 18:41:52CPUMemoryDiskThreads382422827430252415112626162129232426242727232824222413EnergyPorts59912416 13594170812712612116 44017216822723619033313012012112512112512712112612511812172PID248351470040714664801460035848495004784226548248438019146732427311487087349623340701479150891133432824628931710951120232249278005091016,00 GB14,11 GB <1,85 GB2,72 GBApp Memory:Wired Memory:Compressed:NetworkUserlukaslukas_windowserverlukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukas3,77 GB2,94 GB6,85 GB...
|
NULL
|
-9181023457876126007
|
NULL
|
click
|
ocr
|
NULL
|
+SlackFileEditViewGoHistoryWindowHelpED→Search Jim +SlackFileEditViewGoHistoryWindowHelpED→Search Jiminny IncHomeDMsActivityFilesLaterJiminny ...sos+# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Aneliya Angelova, ...86 0• MessagesAdd canvasO Files+предполагчямаме в шрифта наTodayПДФ-а. Не-, рен какво да гиправя?@Nikolay Yankov, някой от горните ли имашпредвид или трето? (edited)Nikolay Yankov 4:09 PMпоследния дето пратих..•Steliyan Georgiev 4:09 PMда, за него говоря и азNikolay Yankov 4:10 PMможе би да ги скипваме такива emojis* 1MoreDirect messagesAneliya Angelova, ...Vasil Vasilevда не пречат на процесването и отговораSteliyan GeorgievAdelina Petrova, Ili...P. Adelina Petrova% Galya DimitrovaRs Nikolay Nikolov "2Galya Dimitrova, Ni...2Galya Dimitrova, Ni...Steliyan Georgiev 4:10 PMне сьм много сигурен какLukas Kovalik 5:41 PMсега ще го добавя това за disable on expired,после може да се тества по сьщия начинкато генериране сьс сьщата командаH1Newi: AppsNikolay Yankov 6:14 PMпушнах фикса за delete да маха реда отраблицатаJira Cloud+ToastMessage Aneliya Angelova, Nikolay Yankov, Steli...Google Cale...+(lol14Activity MonitorAll ProcessesProcess NameBoosteroidFirefoxCP Isolated Web ContentWindowServerFirefoxFirefoxFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentCursorUlViewService (Not Responding)Notion Calendar Helper (Renderer)VTDecoderXPCServiceFirefox GPU HelperFirefox GPU HelperSlack Helper (Renderer)Notion Helper (Renderer)FirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentclaudeMEMORY PRESSUREMem...2,01 GB1,18 GB985,1 MB886,2 MB770,2 MB768,3 MB734,4 MB732,7 MB636,9 MB603,0 MB592,8 MB547,1 MB541,6 MB539,0 MB511,4 MB484,4 MB475,3 MB449,7 MB417,8 MB383,7 MB382,0 MB380,2 MB372,8 MB341,8 MB335,6 MB321,1 MB278,9 MB277,9 MBPhysical Memory:Memory Used:Cached Files:Swap Used:100% <47Tue 14 Apr 18:41:52CPUMemoryDiskThreads382422827430252415112626162129232426242727232824222413EnergyPorts59912416 13594170812712612116 44017216822723619033313012012112512112512712112612511812172PID248351470040714664801460035848495004784226548248438019146732427311487087349623340701479150891133432824628931710951120232249278005091016,00 GB14,11 GB <1,85 GB2,72 GBApp Memory:Wired Memory:Compressed:NetworkUserlukaslukas_windowserverlukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukas3,77 GB2,94 GB6,85 GB...
|
NULL
|
|
16489
|
362
|
58
|
2026-04-14T15:18:47.994139+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776179927994_m1.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
+SlackFileEditViewGoHistoryWindowHelpEDHome1DMSAct +SlackFileEditViewGoHistoryWindowHelpEDHome1DMSActivityFilesLater..•More+→Search Jiminny IncJiminny ...# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesAneliya Angelo...Vasil VasilevSteliyan GeorgievAdelina Petrova, Ili...P. Adelina Petrova% Galya DimitrovaRs Nikolay Nikolov "2Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...i: AppsJira CloudToastGoogle Cale...# general42MessagesMore v@ Files• BookmarksDetraction Cor4 3Today ~0B 1Salesforce for Slack APP5:19 PMPetko Kashinski just closed a renewal withViewz - Renewal (08/06/2026). Nice Work!Amount: USD 3,276ARR: USD 3,276Close Date: April 14, 2026Start Date: June 3, 2026Number of Salespeople:Detraction? falseDetraction Reason:Detraction Context:H1Salesforce for Slack APP5:59 PMPetko Kashinski just closed a renewal withgrape- - Renewal (27/06/2026). Nice Work!Amount: USD 6,274.8ARR: USD 6,274.8Close Date: April 14, 2026Start Date: June 13, 2026Number of Salespeople:Detraction? falseDetraction Reason:Detraction Context:Message #general++New(lol14Activity MonitorAll ProcessesProcess NameBoosteroidFirefoxCP Isolated Web ContentWindowServerFirefoxFirefoxCP Isolated Web ContentFirefoxFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentCursorUlViewService (Not Responding)Notion Calendar Helper (Renderer)VTDecoderXPCServiceSlack Helper (Renderer)Firefox GPU HelperFirefox GPU HelperNotion Helper (Renderer)FirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentclaudeMEMORY PRESSUREMem...2,00 GB1,18 GB991,2 MB887,4 MB776,7 MB763,3 MB739,8 MB733,3 MB636,3 MB599,9 MB591,5 MB549,6 MB547,2 MB541,7 MB506,0 MB483,4 MB475,2 MB433,9 MB416,7 MB382,9 MB377,2 MB373,8 MB372,1 MB348,4 MB335,4 MB321,1 MB278,7 MB277,2 MBPhysical Memory:Memory Used:Cached Files:Swap Used:100% <47Tue 14 Apr 18:18:47CPUMemoryDiskThreads382423803072232515111526262127232526252727232824222413EnergyPorts60012316 13594012670911912516 41217216517922723733312711912112412212612512012612411712072PID248351470040714664600358014500478484984226548248432427380191467311487087349623340701479150891282461334328931710951120232249278005091016,00 GB14,00 GB <1,95 GB3,12 GBApp Memory:Wired Memory:Compressed:NetworkUserlukaslukas_windowserverlukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukas3,90 GB3,03 GB6,52 GB...
|
NULL
|
-9180942286244369604
|
NULL
|
click
|
ocr
|
NULL
|
+SlackFileEditViewGoHistoryWindowHelpEDHome1DMSAct +SlackFileEditViewGoHistoryWindowHelpEDHome1DMSActivityFilesLater..•More+→Search Jiminny IncJiminny ...# general# infra-changes# jiminny-bg# platform-tickets# product_launches# random# releases# sofia-office# support# thank-yous# the_people_of jimi...Direct messagesAneliya Angelo...Vasil VasilevSteliyan GeorgievAdelina Petrova, Ili...P. Adelina Petrova% Galya DimitrovaRs Nikolay Nikolov "2Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...i: AppsJira CloudToastGoogle Cale...# general42MessagesMore v@ Files• BookmarksDetraction Cor4 3Today ~0B 1Salesforce for Slack APP5:19 PMPetko Kashinski just closed a renewal withViewz - Renewal (08/06/2026). Nice Work!Amount: USD 3,276ARR: USD 3,276Close Date: April 14, 2026Start Date: June 3, 2026Number of Salespeople:Detraction? falseDetraction Reason:Detraction Context:H1Salesforce for Slack APP5:59 PMPetko Kashinski just closed a renewal withgrape- - Renewal (27/06/2026). Nice Work!Amount: USD 6,274.8ARR: USD 6,274.8Close Date: April 14, 2026Start Date: June 13, 2026Number of Salespeople:Detraction? falseDetraction Reason:Detraction Context:Message #general++New(lol14Activity MonitorAll ProcessesProcess NameBoosteroidFirefoxCP Isolated Web ContentWindowServerFirefoxFirefoxCP Isolated Web ContentFirefoxFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentCursorUlViewService (Not Responding)Notion Calendar Helper (Renderer)VTDecoderXPCServiceSlack Helper (Renderer)Firefox GPU HelperFirefox GPU HelperNotion Helper (Renderer)FirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentFirefoxCP Isolated Web ContentclaudeMEMORY PRESSUREMem...2,00 GB1,18 GB991,2 MB887,4 MB776,7 MB763,3 MB739,8 MB733,3 MB636,3 MB599,9 MB591,5 MB549,6 MB547,2 MB541,7 MB506,0 MB483,4 MB475,2 MB433,9 MB416,7 MB382,9 MB377,2 MB373,8 MB372,1 MB348,4 MB335,4 MB321,1 MB278,7 MB277,2 MBPhysical Memory:Memory Used:Cached Files:Swap Used:100% <47Tue 14 Apr 18:18:47CPUMemoryDiskThreads382423803072232515111526262127232526252727232824222413EnergyPorts60012316 13594012670911912516 41217216517922723733312711912112412212612512012612411712072PID248351470040714664600358014500478484984226548248432427380191467311487087349623340701479150891282461334328931710951120232249278005091016,00 GB14,00 GB <1,95 GB3,12 GBApp Memory:Wired Memory:Compressed:NetworkUserlukaslukas_windowserverlukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukaslukas3,90 GB3,03 GB6,52 GB...
|
16487
|
|
39046
|
795
|
7
|
2026-04-16T13:28:06.565682+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-16/1776 /Users/lukas/.screenpipe/data/data/2026-04-16/1776346086565_m2.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
162813152242969781/115ШImperial Age--House Built-- 162813152242969781/115ШImperial Age--House Built----Town Center Built---Elite Skirmisher Created-Game Paused (P)Villagerkoval iklukas (DravidiansT 0+1/0+241404 Roger II of Sicily: 5344/53443 Anastasios I Dikoros: 4667/46676 Emperor Karel IV: 4505/45055 Manuel I: 4403/44038 Mundzuk the Hun: 4294/42942 Zbigniew Olesnicki: 3852/38521 kovaliklukas: 3635/36357 Themistocles: 3529/3529BHE...
|
NULL
|
-9180454015606150752
|
NULL
|
visual_change
|
ocr
|
NULL
|
162813152242969781/115ШImperial Age--House Built-- 162813152242969781/115ШImperial Age--House Built----Town Center Built---Elite Skirmisher Created-Game Paused (P)Villagerkoval iklukas (DravidiansT 0+1/0+241404 Roger II of Sicily: 5344/53443 Anastasios I Dikoros: 4667/46676 Emperor Karel IV: 4505/45055 Manuel I: 4403/44038 Mundzuk the Hun: 4294/42942 Zbigniew Olesnicki: 3852/38521 kovaliklukas: 3635/36357 Themistocles: 3529/3529BHE...
|
39043
|
|
35922
|
731
|
55
|
2026-04-16T10:14:07.659730+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-16/1776 /Users/lukas/.screenpipe/data/data/2026-04-16/1776334447659_m2.jpg...
|
Firefox
|
Jiminny · Membrane — Work
|
1
|
console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505 console.getmembrane.com/w/66fd5a6e813fde5d1b8aa505/tenants...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Platform Sprint 2 Q2 - Platform Team - Scrum Board Platform Sprint 2 Q2 - Platform Team - Scrum Board - Jira
[SRD-6793] Les Mills activity types not pulling in - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Pipelines - jiminny/app
Feed — jiminny — Sentry
Inbox (1,561) - [EMAIL] - Jiminny Mail
Jiminny x Shiji - Reconnecting the platform
Jiminny x Shiji - Reconnecting the platform
For you - Confluence
For you - Confluence
Lukas Kovalik - Time Off
Lukas Kovalik - Time Off
Product Growth Platform | Userpilot
Product Growth Platform | Userpilot
Userpilot
Userpilot
fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · jiminny/app
fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · jiminny/app
Jiminny
Jiminny
New Tab
New Tab
Jiminny
Jiminny
Google
Google
IntegrationAccessor | Membrane SDK - v0.28.1
IntegrationAccessor | Membrane SDK - v0.28.1
Jiminny · Membrane
Jiminny · Membrane
Close tab
Fix an autocomplete mistake that swapped Event for EventListener. by Vasil-Jiminny · Pull Request #11977 · jiminny/app...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Platform Sprint 2 Q2 - Platform Team - Scrum Board - Jira","depth":4,"bounds":{"left":0.00234375,"top":0.045138888,"width":0.017578125,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"[SRD-6793] Les Mills activity types not pulling in - Jira","depth":4,"bounds":{"left":0.019921875,"top":0.045138888,"width":0.01796875,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app","depth":4,"bounds":{"left":0.037890624,"top":0.045138888,"width":0.01796875,"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.055859376,"top":0.045138888,"width":0.017578125,"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.0734375,"top":0.045138888,"width":0.01796875,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Inbox (1,561) - lukas.kovalik@jiminny.com - Jiminny Mail","depth":4,"bounds":{"left":0.00234375,"top":0.07361111,"width":0.017578125,"height":0.028472222},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Jiminny x Shiji - Reconnecting the platform","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":"Jiminny x Shiji - Reconnecting the platform","depth":5,"bounds":{"left":0.015625,"top":0.12083333,"width":0.087890625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"For you - 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":"For you - Confluence","depth":5,"bounds":{"left":0.015625,"top":0.14930555,"width":0.04296875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Lukas Kovalik - Time Off","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":"Lukas Kovalik - Time Off","depth":5,"bounds":{"left":0.015625,"top":0.17777778,"width":0.049609374,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Product Growth Platform | Userpilot","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":"Product Growth Platform | Userpilot","depth":5,"bounds":{"left":0.015625,"top":0.20625,"width":0.07304688,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Userpilot","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":"Userpilot","depth":5,"bounds":{"left":0.015625,"top":0.23472223,"width":0.01875,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · 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":"fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · jiminny/app","depth":5,"bounds":{"left":0.015625,"top":0.26319444,"width":0.24101563,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","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":"Jiminny","depth":5,"bounds":{"left":0.015625,"top":0.29166666,"width":0.015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","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":"New Tab","depth":5,"bounds":{"left":0.015625,"top":0.3201389,"width":0.017578125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny","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":"Jiminny","depth":5,"bounds":{"left":0.015625,"top":0.34861112,"width":0.015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Google","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":"Google","depth":5,"bounds":{"left":0.015625,"top":0.37708333,"width":0.014453125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"IntegrationAccessor | Membrane SDK - v0.28.1","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":"IntegrationAccessor | Membrane SDK - v0.28.1","depth":5,"bounds":{"left":0.015625,"top":0.40555555,"width":0.0953125,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Jiminny · Membrane","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":true},{"role":"AXStaticText","text":"Jiminny · Membrane","depth":5,"bounds":{"left":0.015625,"top":0.4340278,"width":0.041015625,"height":0.009722223},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.07890625,"top":0.43055555,"width":0.009375,"height":0.016666668},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Fix an autocomplete mistake that swapped Event for EventListener. by Vasil-Jiminny · Pull Request #11977 · jiminny/app","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}]...
|
-9179379483809825122
|
-2957941638418448183
|
visual_change
|
accessibility
|
NULL
|
Platform Sprint 2 Q2 - Platform Team - Scrum Board Platform Sprint 2 Q2 - Platform Team - Scrum Board - Jira
[SRD-6793] Les Mills activity types not pulling in - Jira
JY-20543 add AJ reports User pilot tracking by LakyLak · Pull Request #11932 · jiminny/app
Pipelines - jiminny/app
Feed — jiminny — Sentry
Inbox (1,561) - [EMAIL] - Jiminny Mail
Jiminny x Shiji - Reconnecting the platform
Jiminny x Shiji - Reconnecting the platform
For you - Confluence
For you - Confluence
Lukas Kovalik - Time Off
Lukas Kovalik - Time Off
Product Growth Platform | Userpilot
Product Growth Platform | Userpilot
Userpilot
Userpilot
fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · jiminny/app
fix(security): composer dependency updates – 2026-04-15 by github-actions[bot] · Pull Request #11970 · jiminny/app
Jiminny
Jiminny
New Tab
New Tab
Jiminny
Jiminny
Google
Google
IntegrationAccessor | Membrane SDK - v0.28.1
IntegrationAccessor | Membrane SDK - v0.28.1
Jiminny · Membrane
Jiminny · Membrane
Close tab
Fix an autocomplete mistake that swapped Event for EventListener. by Vasil-Jiminny · Pull Request #11977 · jiminny/app...
|
NULL
|
|
62319
|
1347
|
8
|
2026-04-21T07:49:53.960091+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776757793960_m2.jpg...
|
iTerm2
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rindelVIeWWindowrTavsco.s°9 master kProledey"C rindelVIeWWindowrTavsco.s°9 master kProledey"C) ActivitvController.oho) SyncObjects.php X©AskAnythingController.php© AskAnythingPromptService.php© AskJiminnyReportsController.php© SyncHubspotActiveDeals.p© JiminnyDebugCommand.php•Automateakeponskepository.pnpC) AutomatedReportsService.onp© AutomatedReportsCommand.phpC) AutomatedReportsController.onp©syncleaa.onp© AutomatedReport.php© SyncOpportunitiesMissingF5 Cc W *g) syncopportunity.onpclass Svnc0bnects extends Command)syncrronllemeradata.ono© SyncTeamMetadata.phpc) UpdateOpportunitySpecificDealinsiahts119 (I•W DevDialersD DTOSEasticsearcha EndadementstatsGecko SxoortM Livestream25 CN MailboxesM MiarateiM PlavhackThemecM PlavhookcPlaylistsTM Postmark> M PronhetAv D Reports© AutomatedReportscommar 3e AutomatodDonarteDotontid© AutomatedReportsSendCol© CreateMockAskJiminnyRep© DeleteReportCommand.phg© GenerateMarketingReport.r© Team.phpc) Usage.php>W Slack>_ Teams→D TracksTranscriotion• TwilidUsers> VocabulanvMZoom(C) Coaching-eedbacksUndatess.© Command.php51© CreateDatabaseUsers.php(C) DatabaseTableCount nhnlC) DevPostmanCommand.nhn© EncryptTokensCommand.php(e) SnanaomontCtatcDoaonoratofFoatureFlaasHelper.onp* Qvac stringprotected $signature = 'crm:sync-objects {team?} {--sync}';* The console command description* avar scringprocecced saescripcion = 'sync remote ckn obnects.** Execute the console command.Steamid = sthis->arqument kev: "team")Steams=if (SteamId)Steamsi = Team:. 1d0rUuld(Steamid)•else <$teams = Team::where( column: 'status',operator: Team: • STATUS ACTTVE)->aeto.SdicnatchIndey = A.foreach ($teams as $team) {scontig = steam->getcrmconflaurationd•if (Sconfig->getAttribute(key: 'sync_objects') === false) {if (Steam->getAttribute(key: 'owner_id') === null) {Sthis->error(sprintf( format: 'Team %s (%s) is not vet assigned an owner. skipping...'. Steam->getName@. Steam->getUuidO)):if (Sconfia->getAttribute( kev: 'over quota at') Il Sconfia->aetAttribute( kev: 'ani disabled at')) {Sthis->error(sorintfdfomnat: "Team %s (%s) APT unavailable.. skinnina.." Steam->aetName@. Steam->aetluid00):ravountes• jiminny(® AirDrop• Recents* Applications9 Documents© Downloadsi lukasiCloud• iCloud Drive999 Sunc tolderL DxP4800PLUS-Bor4 Network• CRM• Orange• Red• Yellow• Greer• Blue• Purple• All Tags...DxP4000PLus-borconnected as: AdminEi Youtubett workна теskEl personal_folder*MUSICtim Moviesta Mediau Maruih Goodlelii ramily tree documentsebooksim Documentsuh dockerE bookdropEim AudiobooksApos# Support Daily - in 4 h 11 m100% S2lue 21 Aor 10.:49:03• Searchiv Date ModifiedSharepoint-= Snarepoint-- Sharepoint= Sharepoint- Sharenoint- SharenointsharepolntSharepoint1 of 20 selected...
|
NULL
|
-9179105020435910906
|
NULL
|
click
|
ocr
|
NULL
|
rindelVIeWWindowrTavsco.s°9 master kProledey"C rindelVIeWWindowrTavsco.s°9 master kProledey"C) ActivitvController.oho) SyncObjects.php X©AskAnythingController.php© AskAnythingPromptService.php© AskJiminnyReportsController.php© SyncHubspotActiveDeals.p© JiminnyDebugCommand.php•Automateakeponskepository.pnpC) AutomatedReportsService.onp© AutomatedReportsCommand.phpC) AutomatedReportsController.onp©syncleaa.onp© AutomatedReport.php© SyncOpportunitiesMissingF5 Cc W *g) syncopportunity.onpclass Svnc0bnects extends Command)syncrronllemeradata.ono© SyncTeamMetadata.phpc) UpdateOpportunitySpecificDealinsiahts119 (I•W DevDialersD DTOSEasticsearcha EndadementstatsGecko SxoortM Livestream25 CN MailboxesM MiarateiM PlavhackThemecM PlavhookcPlaylistsTM Postmark> M PronhetAv D Reports© AutomatedReportscommar 3e AutomatodDonarteDotontid© AutomatedReportsSendCol© CreateMockAskJiminnyRep© DeleteReportCommand.phg© GenerateMarketingReport.r© Team.phpc) Usage.php>W Slack>_ Teams→D TracksTranscriotion• TwilidUsers> VocabulanvMZoom(C) Coaching-eedbacksUndatess.© Command.php51© CreateDatabaseUsers.php(C) DatabaseTableCount nhnlC) DevPostmanCommand.nhn© EncryptTokensCommand.php(e) SnanaomontCtatcDoaonoratofFoatureFlaasHelper.onp* Qvac stringprotected $signature = 'crm:sync-objects {team?} {--sync}';* The console command description* avar scringprocecced saescripcion = 'sync remote ckn obnects.** Execute the console command.Steamid = sthis->arqument kev: "team")Steams=if (SteamId)Steamsi = Team:. 1d0rUuld(Steamid)•else <$teams = Team::where( column: 'status',operator: Team: • STATUS ACTTVE)->aeto.SdicnatchIndey = A.foreach ($teams as $team) {scontig = steam->getcrmconflaurationd•if (Sconfig->getAttribute(key: 'sync_objects') === false) {if (Steam->getAttribute(key: 'owner_id') === null) {Sthis->error(sprintf( format: 'Team %s (%s) is not vet assigned an owner. skipping...'. Steam->getName@. Steam->getUuidO)):if (Sconfia->getAttribute( kev: 'over quota at') Il Sconfia->aetAttribute( kev: 'ani disabled at')) {Sthis->error(sorintfdfomnat: "Team %s (%s) APT unavailable.. skinnina.." Steam->aetName@. Steam->aetluid00):ravountes• jiminny(® AirDrop• Recents* Applications9 Documents© Downloadsi lukasiCloud• iCloud Drive999 Sunc tolderL DxP4800PLUS-Bor4 Network• CRM• Orange• Red• Yellow• Greer• Blue• Purple• All Tags...DxP4000PLus-borconnected as: AdminEi Youtubett workна теskEl personal_folder*MUSICtim Moviesta Mediau Maruih Goodlelii ramily tree documentsebooksim Documentsuh dockerE bookdropEim AudiobooksApos# Support Daily - in 4 h 11 m100% S2lue 21 Aor 10.:49:03• Searchiv Date ModifiedSharepoint-= Snarepoint-- Sharepoint= Sharepoint- Sharenoint- SharenointsharepolntSharepoint1 of 20 selected...
|
62317
|
|
23429
|
505
|
73
|
2026-04-15T11:22:52.943567+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776252172943_m2.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
[CREDIT_CARD]/130toImperial Age-Scout Cavalry Crea [CREDIT_CARD]/130toImperial Age-Scout Cavalry Created--Game Paused (P)BuildingsDisplay the economic and infrastructurebuildings you can build.(Hotkey: Q)Repairerkovalfklukas (Britons))T 0+1/0+24/408 Ashikaga Takauji: 17063/170637 Basil the Macedonian: 15516/155162 Anccu Hualloc: 13236/132361 kovaliklukas: 11449/114493 Bird Jaguar: 7241/72414 Siddhraj Jaisingh: 4510/4510E Henerius: 4037/40376 Mindaugas: 2569/2569NVIVNV...
|
NULL
|
-9178494759756427720
|
NULL
|
click
|
ocr
|
NULL
|
[CREDIT_CARD]/130toImperial Age-Scout Cavalry Crea [CREDIT_CARD]/130toImperial Age-Scout Cavalry Created--Game Paused (P)BuildingsDisplay the economic and infrastructurebuildings you can build.(Hotkey: Q)Repairerkovalfklukas (Britons))T 0+1/0+24/408 Ashikaga Takauji: 17063/170637 Basil the Macedonian: 15516/155162 Anccu Hualloc: 13236/132361 kovaliklukas: 11449/114493 Bird Jaguar: 7241/72414 Siddhraj Jaisingh: 4510/4510E Henerius: 4037/40376 Mindaugas: 2569/2569NVIVNV...
|
NULL
|
|
30285
|
615
|
90
|
2026-04-15T15:00:39.097915+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776265239097_m2.jpg...
|
Boosteroid
|
Boosteroid
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
174162419160451935115/200Imperial Age20--Light Cav 174162419160451935115/200Imperial Age20--Light Cavalry Created---Elite Longbowman Created---Capped Ram Created----Warning: You are being attacked byPlayer 8 Almish Yiltawar!!!-Game Paused (P)Click to select this siege weapon.Trebuchet (Packed)T 2/8Q 16kovalfklukas (Britons))146/1501 kovaliklukas: 47156/47156E Magnus Olafsson: 40786/40706 8 IV8 Almish Yiltawar: 36397/36397 G IVRajyapala: 23275/23275 0 IV6 1Aez16 I0 12424/12424 2 IV[7 Maximilian of Habsbung: 6531/6531 V IV3 Huascár: 5031/50314 Lowig VI: 5792/5702IV...
|
NULL
|
-9178137757247408180
|
NULL
|
click
|
ocr
|
NULL
|
174162419160451935115/200Imperial Age20--Light Cav 174162419160451935115/200Imperial Age20--Light Cavalry Created---Elite Longbowman Created---Capped Ram Created----Warning: You are being attacked byPlayer 8 Almish Yiltawar!!!-Game Paused (P)Click to select this siege weapon.Trebuchet (Packed)T 2/8Q 16kovalfklukas (Britons))146/1501 kovaliklukas: 47156/47156E Magnus Olafsson: 40786/40706 8 IV8 Almish Yiltawar: 36397/36397 G IVRajyapala: 23275/23275 0 IV6 1Aez16 I0 12424/12424 2 IV[7 Maximilian of Habsbung: 6531/6531 V IV3 Huascár: 5031/50314 Lowig VI: 5792/5702IV...
|
NULL
|
|
9571
|
184
|
45
|
2026-04-14T07:44:32.661810+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776152672661_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER881DOCKER (docker-compose)07ms DONEdocker_lamp_1RUNNINGdocker_lamp_1DEV (-zsh)882APP (-zsh)docker_lamp_1docker_1amp_171ms DONEdocker_lamp_1RUNNINGdocker_lamp_11s DONEdocker_1amp_1RUNNINGdocker_lamp_181ms DONEdocker_1amp_1RUNNINGdocker_lamp_117msDONEdocker_lamp_1RUNNINGdocker_lamp_11S DONEdocker_lamp_1RUNNINGdocker_1amp_195ms DONEdocker_lamp_1RUNNINGdocker_lamp_106ms DONEdocker_1amp_1RUNNINGdocker_lamp_187ms DONEdocker_1amp_1RUNNINGdocker_lamp_148ms DONE2026-04-14 07:44:17 Jiminny\Jobs\Crm\Sync0bjects2026-04-1407:44:18 Jiminny(Jobs\Crm\SyncObjects07:44:18 JiminnyWJobs\Crm\SyncObjects2026-04-14 07:44:18Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:18Jiminny Jobs\Crm\SyncObjects2026-04-1407:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-1407:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny WJobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-1407:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects .....2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny Jobs\Crm\SyncObjectsView in Docker DesktopView ConfigEnable Watch-zsh(aolSupport Daily - in 4h 16 m100% C4Tue 14 Apr 10:44:32PROD (-zsh)₴41810 8752.[IP_ADDRESS].118.45.-zsh-zsh86Y2 PROD (-zsh)Last login: Sat Apr 11 11:13:58 on console-zsh* Unable to acce...O 88Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ U|X L3 EU (-zsh)Last login: Sat Apr 11 11:13:58 on consolePoetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.tomlfile in /Users/lukas or its parents@Lukas-Kovaliks-MacBook-Pro-JiminnyT4 STAGE (-zsh)Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminnyssh: connect to host jiminny-stage-bastion port 22: Operation timed outlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny$T5 QA (-zsh)Last login: Sat Apr 11 12:38:35 on ttys003Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.tomlfile in /Users/lukas or its parentsXT6 FE (-zsh)Last login: Sat Apr 11 12:38:35 on ttys004PRODSTAGEPoetry could not find a pyproject.toml file in /Users/lukas or its parents RONTENDPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ IX T7 EXT (-zsh)Poetry could not find a pyproject.toml file in /Users/lukas or its parentsEXTENSIONPoetry could not find a pyproject.tomlfile in /Users/lukas or its parentsukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|...
|
NULL
|
-9177854360305029580
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER881DOCKER (docker-compose)07ms DONEdocker_lamp_1RUNNINGdocker_lamp_1DEV (-zsh)882APP (-zsh)docker_lamp_1docker_1amp_171ms DONEdocker_lamp_1RUNNINGdocker_lamp_11s DONEdocker_1amp_1RUNNINGdocker_lamp_181ms DONEdocker_1amp_1RUNNINGdocker_lamp_117msDONEdocker_lamp_1RUNNINGdocker_lamp_11S DONEdocker_lamp_1RUNNINGdocker_1amp_195ms DONEdocker_lamp_1RUNNINGdocker_lamp_106ms DONEdocker_1amp_1RUNNINGdocker_lamp_187ms DONEdocker_1amp_1RUNNINGdocker_lamp_148ms DONE2026-04-14 07:44:17 Jiminny\Jobs\Crm\Sync0bjects2026-04-1407:44:18 Jiminny(Jobs\Crm\SyncObjects07:44:18 JiminnyWJobs\Crm\SyncObjects2026-04-14 07:44:18Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:18Jiminny Jobs\Crm\SyncObjects2026-04-1407:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-1407:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny WJobs\Crm\SyncObjects2026-04-14 07:44:19Jiminny\Jobs\Crm\SyncObjects2026-04-1407:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects .....2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny\Jobs\Crm\SyncObjects2026-04-14 07:44:21 Jiminny Jobs\Crm\SyncObjectsView in Docker DesktopView ConfigEnable Watch-zsh(aolSupport Daily - in 4h 16 m100% C4Tue 14 Apr 10:44:32PROD (-zsh)₴41810 8752.[IP_ADDRESS].118.45.-zsh-zsh86Y2 PROD (-zsh)Last login: Sat Apr 11 11:13:58 on console-zsh* Unable to acce...O 88Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ U|X L3 EU (-zsh)Last login: Sat Apr 11 11:13:58 on consolePoetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.tomlfile in /Users/lukas or its parents@Lukas-Kovaliks-MacBook-Pro-JiminnyT4 STAGE (-zsh)Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminnyssh: connect to host jiminny-stage-bastion port 22: Operation timed outlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny$T5 QA (-zsh)Last login: Sat Apr 11 12:38:35 on ttys003Poetry could not find a pyproject.toml file in /Users/lukas or its parentsPoetry could not find a pyproject.tomlfile in /Users/lukas or its parentsXT6 FE (-zsh)Last login: Sat Apr 11 12:38:35 on ttys004PRODSTAGEPoetry could not find a pyproject.toml file in /Users/lukas or its parents RONTENDPoetry could not find a pyproject.toml file in /Users/lukas or its parentslukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ IX T7 EXT (-zsh)Poetry could not find a pyproject.toml file in /Users/lukas or its parentsEXTENSIONPoetry could not find a pyproject.tomlfile in /Users/lukas or its parentsukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|...
|
9570
|
|
18842
|
399
|
3
|
2026-04-15T06:59:50.823760+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776236390823_m1.jpg...
|
Firefox
|
Meet - [Platform] Planning I Session 📅 — Work
|
1
|
meet.google.com/tgb-pyuf-dri?authuser=lukas.kovali meet.google.com/tgb-pyuf-dri?authuser=lukas.kovalik%40jiminny.com...
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Meet - [Platform] Planning I Session 📅","depth":4,"bounds":{"left":0.0,"top":0.072222225,"width":0.16631944,"height":0.045555554},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Meet - [Platform] Planning I Session 📅","depth":5,"bounds":{"left":0.027777778,"top":0.08777778,"width":0.14166667,"height":0.016111111},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.140625,"top":0.08222222,"width":0.016666668,"height":0.026666667},"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.005902778,"top":0.12,"width":0.15486111,"height":0.035555556},"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.005902778,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.028819444,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.052083332,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.07534722,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.09861111,"top":0.9583333,"width":0.022222223,"height":0.035555556},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Return to home screen","depth":10,"bounds":{"left":0.17743056,"top":0.09,"width":0.072916664,"height":0.044444446},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lukas.kovalik@jiminny.com","depth":12,"bounds":{"left":0.83923614,"top":0.09166667,"width":0.11631945,"height":0.018333333},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Switch account","depth":11,"bounds":{"left":0.8940972,"top":0.11,"width":0.061458334,"height":0.017777778},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Switch account","depth":12,"bounds":{"left":0.8940972,"top":0.11,"width":0.061458334,"height":0.017777778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Lukas Kovalik","depth":14,"bounds":{"left":0.18854167,"top":0.29222223,"width":0.0625,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"More options","depth":13,"bounds":{"left":0.6263889,"top":0.27611113,"width":0.033333335,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Turn off microphone","depth":14,"bounds":{"left":0.35277778,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Turn off camera","depth":14,"bounds":{"left":0.4027778,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Turn on background blur","depth":13,"bounds":{"left":0.45277777,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Microphone: soundcore AeroClip","depth":13,"bounds":{"left":0.17743056,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Speaker: System Default Speaker Device","depth":13,"bounds":{"left":0.30104166,"top":0.7272222,"width":0.11840278,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Camera: FaceTime HD Camera","depth":13,"bounds":{"left":0.425,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Backgrounds and effects","depth":12,"bounds":{"left":0.5486111,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXHeading","text":"[Platform] Planning I Session 📅","depth":11,"bounds":{"left":0.67777777,"top":0.32166666,"width":0.31111112,"height":0.04},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[Platform] Planning I Session 📅","depth":14,"bounds":{"left":0.69895834,"top":0.3211111,"width":0.2690972,"height":0.04111111},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Steliyan Georgiev is in this call","depth":13,"bounds":{"left":0.7625,"top":0.4161111,"width":0.14166667,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Use Gemini to take notes Share notes and transcript","depth":11,"bounds":{"left":0.72152776,"top":0.455,"width":0.22361112,"height":0.07111111},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Use Gemini to take notes","depth":12,"bounds":{"left":0.76319444,"top":0.47166666,"width":0.1125,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Share notes and transcript","depth":12,"bounds":{"left":0.76319444,"top":0.49333334,"width":0.10034722,"height":0.017222222},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start","depth":12,"bounds":{"left":0.88125,"top":0.46833333,"width":0.055555556,"height":0.044444446},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start","depth":14,"bounds":{"left":0.8979167,"top":0.48055556,"width":0.022222223,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Join now","depth":12,"bounds":{"left":0.75,"top":0.54388887,"width":0.16666667,"height":0.062222224},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":true,"is_selected":false},{"role":"AXStaticText","text":"Join now","depth":14,"bounds":{"left":0.81319445,"top":0.565,"width":0.04027778,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Other ways to join","depth":12,"bounds":{"left":0.76840276,"top":0.63722223,"width":0.12986112,"height":0.044444446},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.","depth":12,"bounds":{"left":0.36319444,"top":0.9,"width":0.46770832,"height":0.055},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Learn more","depth":12,"bounds":{"left":0.61493057,"top":0.93666667,"width":0.049652778,"height":0.018333333},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Learn more","depth":13,"bounds":{"left":0.61493057,"top":0.93666667,"width":0.049652778,"height":0.018333333},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Your camera is on. Your microphone is on.","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Background is now replaced","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9177735874948898907
|
4560124713534473809
|
visual_change
|
accessibility
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
NULL
|
|
18843
|
400
|
4
|
2026-04-15T06:59:51.567172+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776236391567_m2.jpg...
|
Firefox
|
Meet - [Platform] Planning I Session 📅 — Work
|
1
|
meet.google.com/tgb-pyuf-dri?authuser=lukas.kovali meet.google.com/tgb-pyuf-dri?authuser=lukas.kovalik%40jiminny.com...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Meet - [Platform] Planning I Session 📅","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.09355469,"height":-0.045138836},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Meet - [Platform] Planning I Session 📅","depth":5,"bounds":{"left":0.24882813,"top":1.0,"width":0.0796875,"height":-0.05486107},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.31230468,"top":1.0,"width":0.009375,"height":-0.05138886},"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.23652343,"top":1.0,"width":0.08710937,"height":-0.07500005},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"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,"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,"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,"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,"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Return to home screen","depth":10,"bounds":{"left":0.3330078,"top":1.0,"width":0.041015625,"height":-0.056249976},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lukas.kovalik@jiminny.com","depth":12,"bounds":{"left":0.70527345,"top":1.0,"width":0.06542969,"height":-0.057291627},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Switch account","depth":11,"bounds":{"left":0.7361328,"top":1.0,"width":0.034570314,"height":-0.068750024},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Switch account","depth":12,"bounds":{"left":0.7361328,"top":1.0,"width":0.034570314,"height":-0.068750024},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Lukas Kovalik","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"More options","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Turn off microphone","depth":14,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Turn off camera","depth":14,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Turn on background blur","depth":13,"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Microphone: soundcore AeroClip","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Speaker: System Default Speaker Device","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Camera: FaceTime HD Camera","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Backgrounds and effects","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXHeading","text":"[Platform] Planning I Session 📅","depth":11,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[Platform] Planning I Session 📅","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Steliyan Georgiev is in this call","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Use Gemini to take notes Share notes and transcript","depth":11,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Use Gemini to take notes","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Share notes and transcript","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Join now","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":true,"is_selected":false},{"role":"AXStaticText","text":"Join now","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Other ways to join","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Learn more","depth":12,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Learn more","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Your camera is on. Your microphone is on.","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Background is now replaced","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9177735874948898907
|
4560124713534473809
|
visual_change
|
accessibility
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
18841
|
|
18846
|
399
|
5
|
2026-04-15T06:59:53.617505+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776236393617_m1.jpg...
|
Firefox
|
Meet - [Platform] Planning I Session 📅 — Work
|
1
|
meet.google.com/tgb-pyuf-dri?authuser=lukas.kovali meet.google.com/tgb-pyuf-dri?authuser=lukas.kovalik%40jiminny.com...
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Meet - [Platform] Planning I Session 📅","depth":4,"bounds":{"left":0.0,"top":0.072222225,"width":0.16631944,"height":0.045555554},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Meet - [Platform] Planning I Session 📅","depth":5,"bounds":{"left":0.027777778,"top":0.08777778,"width":0.14166667,"height":0.016111111},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.140625,"top":0.08222222,"width":0.016666668,"height":0.026666667},"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.005902778,"top":0.12,"width":0.15486111,"height":0.035555556},"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.005902778,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.028819444,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.052083332,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.07534722,"top":0.9583333,"width":0.022222223,"height":0.035555556},"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.09861111,"top":0.9583333,"width":0.022222223,"height":0.035555556},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Return to home screen","depth":10,"bounds":{"left":0.17743056,"top":0.09,"width":0.072916664,"height":0.044444446},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lukas.kovalik@jiminny.com","depth":12,"bounds":{"left":0.83923614,"top":0.09166667,"width":0.11631945,"height":0.018333333},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Switch account","depth":11,"bounds":{"left":0.8940972,"top":0.11,"width":0.061458334,"height":0.017777778},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Switch account","depth":12,"bounds":{"left":0.8940972,"top":0.11,"width":0.061458334,"height":0.017777778},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Lukas Kovalik","depth":14,"bounds":{"left":0.18854167,"top":0.29222223,"width":0.0625,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"More options","depth":13,"bounds":{"left":0.6263889,"top":0.27611113,"width":0.033333335,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Turn off microphone","depth":14,"bounds":{"left":0.35277778,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Turn off camera","depth":14,"bounds":{"left":0.4027778,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Turn on background blur","depth":13,"bounds":{"left":0.45277777,"top":0.6338889,"width":0.03888889,"height":0.053333335},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Microphone: soundcore AeroClip","depth":13,"bounds":{"left":0.17743056,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Speaker: System Default Speaker Device","depth":13,"bounds":{"left":0.30104166,"top":0.7272222,"width":0.11840278,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Camera: FaceTime HD Camera","depth":13,"bounds":{"left":0.425,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Backgrounds and effects","depth":12,"bounds":{"left":0.5486111,"top":0.7272222,"width":0.11805555,"height":0.035555556},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXHeading","text":"[Platform] Planning I Session 📅","depth":11,"bounds":{"left":0.67777777,"top":0.32166666,"width":0.31111112,"height":0.04},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[Platform] Planning I Session 📅","depth":14,"bounds":{"left":0.69895834,"top":0.3211111,"width":0.2690972,"height":0.04111111},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Steliyan Georgiev is in this call","depth":13,"bounds":{"left":0.7625,"top":0.4161111,"width":0.14166667,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Use Gemini to take notes Share notes and transcript","depth":11,"bounds":{"left":0.72152776,"top":0.455,"width":0.22361112,"height":0.07111111},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Use Gemini to take notes","depth":12,"bounds":{"left":0.76319444,"top":0.47166666,"width":0.1125,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Share notes and transcript","depth":12,"bounds":{"left":0.76319444,"top":0.49333334,"width":0.10034722,"height":0.017222222},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start","depth":12,"bounds":{"left":0.88125,"top":0.46833333,"width":0.055555556,"height":0.044444446},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start","depth":14,"bounds":{"left":0.8979167,"top":0.48055556,"width":0.022222223,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Join now","depth":12,"bounds":{"left":0.75,"top":0.54388887,"width":0.16666667,"height":0.062222224},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":true,"is_selected":false},{"role":"AXStaticText","text":"Join now","depth":14,"bounds":{"left":0.81319445,"top":0.565,"width":0.04027778,"height":0.020555556},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Other ways to join","depth":12,"bounds":{"left":0.76840276,"top":0.63722223,"width":0.12986112,"height":0.044444446},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.","depth":12,"bounds":{"left":0.36319444,"top":0.9,"width":0.46770832,"height":0.055},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Learn more","depth":12,"bounds":{"left":0.61493057,"top":0.93666667,"width":0.049652778,"height":0.018333333},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Learn more","depth":13,"bounds":{"left":0.61493057,"top":0.93666667,"width":0.049652778,"height":0.018333333},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Your camera is on. Your microphone is on.","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Background is now replaced","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9177735874948898907
|
4560124713534473809
|
click
|
accessibility
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
NULL
|
|
18847
|
400
|
6
|
2026-04-15T06:59:53.598351+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776236393598_m2.jpg...
|
Firefox
|
Meet - [Platform] Planning I Session 📅 — Work
|
1
|
meet.google.com/tgb-pyuf-dri?authuser=lukas.kovali meet.google.com/tgb-pyuf-dri?authuser=lukas.kovalik%40jiminny.com...
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"Meet - [Platform] Planning I Session 📅","depth":4,"bounds":{"left":0.23320313,"top":1.0,"width":0.09355469,"height":-0.045138836},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Meet - [Platform] Planning I Session 📅","depth":5,"bounds":{"left":0.24882813,"top":1.0,"width":0.0796875,"height":-0.05486107},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.31230468,"top":1.0,"width":0.009375,"height":-0.05138886},"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.23652343,"top":1.0,"width":0.08710937,"height":-0.07500005},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Customize sidebar","depth":6,"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,"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,"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,"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,"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXLink","text":"Return to home screen","depth":10,"bounds":{"left":0.3330078,"top":1.0,"width":0.041015625,"height":-0.056249976},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lukas.kovalik@jiminny.com","depth":12,"bounds":{"left":0.70527345,"top":1.0,"width":0.06542969,"height":-0.057291627},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Switch account","depth":11,"bounds":{"left":0.7361328,"top":1.0,"width":0.034570314,"height":-0.068750024},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Switch account","depth":12,"bounds":{"left":0.7361328,"top":1.0,"width":0.034570314,"height":-0.068750024},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Lukas Kovalik","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"More options","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Turn off microphone","depth":14,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Turn off camera","depth":14,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Turn on background blur","depth":13,"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Microphone: soundcore AeroClip","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Speaker: System Default Speaker Device","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Camera: FaceTime HD Camera","depth":13,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Backgrounds and effects","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXHeading","text":"[Platform] Planning I Session 📅","depth":11,"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[Platform] Planning I Session 📅","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Steliyan Georgiev is in this call","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Use Gemini to take notes Share notes and transcript","depth":11,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Use Gemini to take notes","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Share notes and transcript","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Start","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Start","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Join now","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":true,"is_selected":false},{"role":"AXStaticText","text":"Join now","depth":14,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Other ways to join","depth":12,"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.","depth":12,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"Learn more","depth":12,"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Learn more","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Your camera is on. Your microphone is on.","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Background is now replaced","depth":8,"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9177735874948898907
|
4560124713534473809
|
click
|
accessibility
|
NULL
|
Meet - [Platform] Planning I Session 📅
Meet - [Pla Meet - [Platform] Planning I Session 📅
Meet - [Platform] Planning I Session 📅
Close tab
New Tab
Customize sidebar
Open Google Gemini (⌃X)
Tabs from other devices
Open history (⇧⌘H)
Open bookmarks (⌘B)
Return to home screen
[EMAIL]
Switch account
Switch account
Lukas Kovalik
More options
Turn off microphone
Turn off camera
Turn on background blur
Microphone: soundcore AeroClip
Speaker: System Default Speaker Device
Camera: FaceTime HD Camera
Backgrounds and effects
[Platform] Planning I Session 📅
[Platform] Planning I Session 📅
Steliyan Georgiev is in this call
Use Gemini to take notes Share notes and transcript
Use Gemini to take notes
Share notes and transcript
Start
Start
Join now
Join now
Other ways to join
Gemini is available in Meet as your personal in-meeting assistant. It can analyze conversation via temporary access to meeting captions. Using Ask Gemini won't create a recording or store meeting data. The meeting host can turn it off.
Learn more
Learn more
Your camera is on. Your microphone is on.
Background is now replaced...
|
18845
|
|
15240
|
343
|
3
|
2026-04-14T14:32:46.534858+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-14/1776 /Users/lukas/.screenpipe/data/data/2026-04-14/1776177166534_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
+SackFileEditViewHistoryWindowJiminny ...DMs= Unre +SackFileEditViewHistoryWindowJiminny ...DMs= Unreads@ Threads6 HuddlesDrafts & sent8 DirectoriesAchivityEh External connectionsFiles# Starred& platform-inner-teamMore* Channels# ai-chapter# alerts# backend# confusion-clinia# curiosity_labiengineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# randomuc releases# sofia-office# support# thank-yous# the people of jimi...Direct messasesAneliya Angelova, ...Bo Vasil VasilevC. Steliyan Georgiev L3 Adelina Petrova, Ili...- Adelina PetrovaD. Galya Dimitrova PPa Nikolay Nikolov 72 Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...## AppsToasti Jira CloudGooge cale..HelpQ Search Jiminny IncEo Vasil Vasilev• Messagest Add canvasC Files& P[URL_WITH_CREDENTIALS] 0A SF [jiminny@localhost]Al console (EU]Tx: AutovPlaygroundA console [STAGING] Xeforce';Sa jiminny v0 18 A16 Х 13 AK<->1: on g.playbook_id = p.id where g.team_id = 1;ybook_id = 175;7160;ry_1d, user_ld,leao o, contact o, cccount , 00dorumry Lor staormnscruomion dor starus"1 ana cype ="conterence_time IS NOT NULL3; # 00U0400000pCZojMAC1= pc.playbooK_1devent'ation_id = 1 and object_type = 'event':eld_id = 4;Layouts pl 1<->1.n: on cl.id = pl.layout_idook_id = 175;• Retro - Pattorm • 43 m leftA100% [45)8 • Tue 14 Apr 17:32:46CascadeReview Automated Re• Fix AutomatedRepoltests are failing @AutomatedReportsCommandTest.php fix it and keep running and fixing until it passesLet me read the test file and run the tests to see what's failing.wNow let me run the lests lo see the actual Tallures.dockerartisan testtests/Unxt/Console/Comnands/Reports/AutomatedReportsComnandTest. php --no-coverage 2%61FAILTests\Unit\Console\Colanas\kepores yaucoma ceareporescommanarestfdr ask jiminny reportsweekly reports on mondaydo not process weekly0.03 90.01sV.29une issue is clear Aucomareakeporcskepository:: upodte nas a tyoe-nintee parameler Aucomacedkeport sreport, but the test passes a plain Mockery: :mock() object instead of a mock of AutomatedReport . Let me checkthe update method signature:The update() method requires AutomatedReport $report . The test mocks the expired report as a plain Mockery::mock() , which fails the type check when the real update() is called (Mockery generates a real typed methodsienatureThe fix is to mock the expired report as AutomatedReport specifically:•Autom11AutomatedReoortscommandiest.ononow run the rests acainyCommand dockeno desker xe/concole/Comnan s/RportsaAutonatedReportsCommandTest.php -no-coverage 261Run a+LS NULL)Te cepontaia IN (18, 33):10932;activity_search_id = 10932;desc;p by id desc;e ceontaia In (37);to_bin('18a06a75-afd2-476f-aadc-14d4057bdda2') = uuid:1 file +92>Ask anything (884L)+ ‹› CodeClaude Sonnet 4.6Reject allAccept all( 4 spaces...
|
NULL
|
-9177019792192900344
|
NULL
|
visual_change
|
ocr
|
NULL
|
+SackFileEditViewHistoryWindowJiminny ...DMs= Unre +SackFileEditViewHistoryWindowJiminny ...DMs= Unreads@ Threads6 HuddlesDrafts & sent8 DirectoriesAchivityEh External connectionsFiles# Starred& platform-inner-teamMore* Channels# ai-chapter# alerts# backend# confusion-clinia# curiosity_labiengineering# frontend# general# infra-changes# jiminny-bg# platform-tickets# product_launches# randomuc releases# sofia-office# support# thank-yous# the people of jimi...Direct messasesAneliya Angelova, ...Bo Vasil VasilevC. Steliyan Georgiev L3 Adelina Petrova, Ili...- Adelina PetrovaD. Galya Dimitrova PPa Nikolay Nikolov 72 Galya Dimitrova, Ni...2 Galya Dimitrova, Ni...## AppsToasti Jira CloudGooge cale..HelpQ Search Jiminny IncEo Vasil Vasilev• Messagest Add canvasC Files& P[URL_WITH_CREDENTIALS] 0A SF [jiminny@localhost]Al console (EU]Tx: AutovPlaygroundA console [STAGING] Xeforce';Sa jiminny v0 18 A16 Х 13 AK<->1: on g.playbook_id = p.id where g.team_id = 1;ybook_id = 175;7160;ry_1d, user_ld,leao o, contact o, cccount , 00dorumry Lor staormnscruomion dor starus"1 ana cype ="conterence_time IS NOT NULL3; # 00U0400000pCZojMAC1= pc.playbooK_1devent'ation_id = 1 and object_type = 'event':eld_id = 4;Layouts pl 1<->1.n: on cl.id = pl.layout_idook_id = 175;• Retro - Pattorm • 43 m leftA100% [45)8 • Tue 14 Apr 17:32:46CascadeReview Automated Re• Fix AutomatedRepoltests are failing @AutomatedReportsCommandTest.php fix it and keep running and fixing until it passesLet me read the test file and run the tests to see what's failing.wNow let me run the lests lo see the actual Tallures.dockerartisan testtests/Unxt/Console/Comnands/Reports/AutomatedReportsComnandTest. php --no-coverage 2%61FAILTests\Unit\Console\Colanas\kepores yaucoma ceareporescommanarestfdr ask jiminny reportsweekly reports on mondaydo not process weekly0.03 90.01sV.29une issue is clear Aucomareakeporcskepository:: upodte nas a tyoe-nintee parameler Aucomacedkeport sreport, but the test passes a plain Mockery: :mock() object instead of a mock of AutomatedReport . Let me checkthe update method signature:The update() method requires AutomatedReport $report . The test mocks the expired report as a plain Mockery::mock() , which fails the type check when the real update() is called (Mockery generates a real typed methodsienatureThe fix is to mock the expired report as AutomatedReport specifically:•Autom11AutomatedReoortscommandiest.ononow run the rests acainyCommand dockeno desker xe/concole/Comnan s/RportsaAutonatedReportsCommandTest.php -no-coverage 261Run a+LS NULL)Te cepontaia IN (18, 33):10932;activity_search_id = 10932;desc;p by id desc;e ceontaia In (37);to_bin('18a06a75-afd2-476f-aadc-14d4057bdda2') = uuid:1 file +92>Ask anything (884L)+ ‹› CodeClaude Sonnet 4.6Reject allAccept all( 4 spaces...
|
15239
|
|
58036
|
1246
|
37
|
2026-04-20T12:21:24.272919+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776687684272_m1.jpg...
|
Activity Monitor
|
Activity Monitor
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Activity MonitorFileEditViewWindowHelpmeet.google. Activity MonitorFileEditViewWindowHelpmeet.google.com/cxs-eips-npt?authuseNikolay Nikolov (Presenting, annotating)2 (JY-20615) Nosty theZ (JY-20613) Alow Owne2 (uY-20500) Batch initlnlyYS1zbGFjay1pt0 1000C Debug ore-syne.88Q SearchJiminny New) /Cl Add parent/ A Jy-20613Allow owner's role to be selected when setting up a trialDescription |Stoyan is seeing more cases where the Owner doesn't want to connect their calendar and email to Jiminny. This is because they don't want to be a recordiCurrently when a trial is created we give the Owner a Recorder role by default. In most cases he really needs to be a recorder.• allow Implementations to select the role of the owner when setting up a trialput the field bellow the Owner field• the choices should only be - Recorder, Recorder & Voice, Analyst• this option shouldn't appear when editing an organisation• when the owner signs in, they should have the selected role + Admin permissions |SubtasksLinked work itemsActivityHistoryWork logAdd a comment...Who is working on this..?Status update….Thanks...Pro tipc press M to comment1meet.google.com is sharing your screen.3:21 PM | [Platform] Refinement •Activity MonitorAll ProcessesProcess Namekernel_taskcom.apple.Virtualization.VirtualMachineFirefoxCP Isolated Web ContentscreenpipeWindowServermds_storesFirefox GPU HelperPhpStormCleanShot XFirefoxFirefoxCP Isolated Web Contentcoreaudiodbluetoothdappleh13cameradreplaydWispr Flow Helper (Renderer)language_server_macos_armClaudeFirefoxCP Socket ProcesslaunchservicesdActivity MonitorWispr Flow Helper (Renderer)iTerm2FirefoxCP Isolated Web ContentWispr Flowio.kandji.KandjiAgent.ESF-Extensionsyspolicydcef_server Helper (Renderer)System:User:Idle:50,99%44,55%4,46%(abl% CPU160,9116,793,957,047,941,437,430,325,517,316,66,35,45,35,24,64,64,64,14,03,82,92,92,92,82,22,12,1CPU LOAD19:35A100% C8• Mon 20 Apr 15:21:23CPUMemoryEnergyDiskNetworkCPU TimeThreads2:39:36,1633:05,6326:07,8827:08,2534:43,625:51,2320:51,371:05:30,914:51,4211:27,015:00,686:24,453:38,191:10,261:50,763:41,176:27,162:51,621:16,546:17,673:22,873:05,463:31,971:07,973:00,036:56,174:54,7237,90Idle Wake-Ups Threads:Processes:4 239415Kind...
|
NULL
|
-9176821835695699771
|
NULL
|
click
|
ocr
|
NULL
|
Activity MonitorFileEditViewWindowHelpmeet.google. Activity MonitorFileEditViewWindowHelpmeet.google.com/cxs-eips-npt?authuseNikolay Nikolov (Presenting, annotating)2 (JY-20615) Nosty theZ (JY-20613) Alow Owne2 (uY-20500) Batch initlnlyYS1zbGFjay1pt0 1000C Debug ore-syne.88Q SearchJiminny New) /Cl Add parent/ A Jy-20613Allow owner's role to be selected when setting up a trialDescription |Stoyan is seeing more cases where the Owner doesn't want to connect their calendar and email to Jiminny. This is because they don't want to be a recordiCurrently when a trial is created we give the Owner a Recorder role by default. In most cases he really needs to be a recorder.• allow Implementations to select the role of the owner when setting up a trialput the field bellow the Owner field• the choices should only be - Recorder, Recorder & Voice, Analyst• this option shouldn't appear when editing an organisation• when the owner signs in, they should have the selected role + Admin permissions |SubtasksLinked work itemsActivityHistoryWork logAdd a comment...Who is working on this..?Status update….Thanks...Pro tipc press M to comment1meet.google.com is sharing your screen.3:21 PM | [Platform] Refinement •Activity MonitorAll ProcessesProcess Namekernel_taskcom.apple.Virtualization.VirtualMachineFirefoxCP Isolated Web ContentscreenpipeWindowServermds_storesFirefox GPU HelperPhpStormCleanShot XFirefoxFirefoxCP Isolated Web Contentcoreaudiodbluetoothdappleh13cameradreplaydWispr Flow Helper (Renderer)language_server_macos_armClaudeFirefoxCP Socket ProcesslaunchservicesdActivity MonitorWispr Flow Helper (Renderer)iTerm2FirefoxCP Isolated Web ContentWispr Flowio.kandji.KandjiAgent.ESF-Extensionsyspolicydcef_server Helper (Renderer)System:User:Idle:50,99%44,55%4,46%(abl% CPU160,9116,793,957,047,941,437,430,325,517,316,66,35,45,35,24,64,64,64,14,03,82,92,92,92,82,22,12,1CPU LOAD19:35A100% C8• Mon 20 Apr 15:21:23CPUMemoryEnergyDiskNetworkCPU TimeThreads2:39:36,1633:05,6326:07,8827:08,2534:43,625:51,2320:51,371:05:30,914:51,4211:27,015:00,686:24,453:38,191:10,261:50,763:41,176:27,162:51,621:16,546:17,673:22,873:05,463:31,971:07,973:00,036:56,174:54,7237,90Idle Wake-Ups Threads:Processes:4 239415Kind...
|
NULL
|
|
57143
|
1231
|
12
|
2026-04-20T11:43:23.445235+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-20/1776 /Users/lukas/.screenpipe/data/data/2026-04-20/1776685403445_m1.jpg...
|
Firefox
|
Firefox
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpAPP (-zsh)APP (-zsh)‹$0lall-zsh100% C47 8 Mon 20 Apr 14:43:23T₴1|screenpipe"• *5DOCKER• 881DEV (docker)$82*3*4.env.localapp/Console/Commands/JiminnyDebugCommand.phpapp/Http/Controllers/API/ActivityController.phpapp/Jobs/Team/SyncToIntercom.phpapp/Services/PlaybackService.phpconfig/logging.phproutes/web.phpSwitched to branch 'master'Your branch is behind 'origin/master' by 21 commits, and can be fast-forwarded.Cuse"git pull" to update your local branch)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ git pullremote:Enumerating objects: 68,done.remote: Countingobjects:100% (68/68),done.remote: Compressingobjects: 100% (41/41), done.remote: Total 68 (delta 32), reused 43Unpacking objects: 100% (68/68), 23.86 KiB | 444.00 KiB/s, done.150 20.0 Ctre, ded o (rron o)From github.com:jiminny/appffb7934cc3..4eec6ce5d2master-> origin/master96e71f9934..752fb7acldJY-18909-automated-reports-ask-jiminny-› origin/JY-18909-automated-reports-ask-jiminnya8959a0497..f2c64f3fa3JY-20695-handle-no-raw-transcript-› origin/JY-20695-handle-no-raw-transcript+ fec25f3343...f0119c9d87 JY-20701-reschedule-HubSpot-processing-> origin/JY-20701-reschedule-HubSpot-processing(forced update)9b30c928c4..f4d9b3911bJY-9712-change-forever-nudges-to-1-year-expiration - origin/JY-9712-change-forever-nudges-to-1-year-expirationUpdating 12ac2f1273..4eec6ce5d2Fast-forwardapp/Console/Commands/Crm/SyncObjects.php34app/Http/Controllers/Internal/WebhookReceiver/HubspotController.phpapp/Http/Controllers/Webhook/Hubspot/EventsController.phpapp/Http/Controllers/Webhook/Hubspot/ProcessesWebhooksTrait.phpapp/Jobs/Crm/SyncObjects.phpapp/Jobs/Crm/SyncOpportunitiesJob.phpapp/Services/Crm/BaseService.phpapp/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTrait.phpfront-end/src/components/connect/connect.vuefront-end/src/components/onboard/Onboard.vuetests/Feature/Services/Crm/BaseServiceTest.phptests/Unit/Http/Controllers/Webhook/Hubspot/ProcessesWebhooksTraitTest.phptests/Unit/Jobs/Crm/Sync0bjectsTest.phptests/Unit/Jobs/Crm/SyncOpportunitiesJobTest.phptests/Unit/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTest.phptests/Unit/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTraitSyncOpportuniTermt.php files changed, 924 insertions(+), 147 deletions(-)create mode 100644 tests/Feature/Services/CrClick or hold page_up + page_down to start dictatingcreate mode 100644 tests/Unit/Http/ControllePScreate mode 100644 tests/Unit/Services/Crm/H(wallukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiAPP...
|
NULL
|
-9176724415681695370
|
NULL
|
visual_change
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpAPP (-zsh)APP (-zsh)‹$0lall-zsh100% C47 8 Mon 20 Apr 14:43:23T₴1|screenpipe"• *5DOCKER• 881DEV (docker)$82*3*4.env.localapp/Console/Commands/JiminnyDebugCommand.phpapp/Http/Controllers/API/ActivityController.phpapp/Jobs/Team/SyncToIntercom.phpapp/Services/PlaybackService.phpconfig/logging.phproutes/web.phpSwitched to branch 'master'Your branch is behind 'origin/master' by 21 commits, and can be fast-forwarded.Cuse"git pull" to update your local branch)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ git pullremote:Enumerating objects: 68,done.remote: Countingobjects:100% (68/68),done.remote: Compressingobjects: 100% (41/41), done.remote: Total 68 (delta 32), reused 43Unpacking objects: 100% (68/68), 23.86 KiB | 444.00 KiB/s, done.150 20.0 Ctre, ded o (rron o)From github.com:jiminny/appffb7934cc3..4eec6ce5d2master-> origin/master96e71f9934..752fb7acldJY-18909-automated-reports-ask-jiminny-› origin/JY-18909-automated-reports-ask-jiminnya8959a0497..f2c64f3fa3JY-20695-handle-no-raw-transcript-› origin/JY-20695-handle-no-raw-transcript+ fec25f3343...f0119c9d87 JY-20701-reschedule-HubSpot-processing-> origin/JY-20701-reschedule-HubSpot-processing(forced update)9b30c928c4..f4d9b3911bJY-9712-change-forever-nudges-to-1-year-expiration - origin/JY-9712-change-forever-nudges-to-1-year-expirationUpdating 12ac2f1273..4eec6ce5d2Fast-forwardapp/Console/Commands/Crm/SyncObjects.php34app/Http/Controllers/Internal/WebhookReceiver/HubspotController.phpapp/Http/Controllers/Webhook/Hubspot/EventsController.phpapp/Http/Controllers/Webhook/Hubspot/ProcessesWebhooksTrait.phpapp/Jobs/Crm/SyncObjects.phpapp/Jobs/Crm/SyncOpportunitiesJob.phpapp/Services/Crm/BaseService.phpapp/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTrait.phpfront-end/src/components/connect/connect.vuefront-end/src/components/onboard/Onboard.vuetests/Feature/Services/Crm/BaseServiceTest.phptests/Unit/Http/Controllers/Webhook/Hubspot/ProcessesWebhooksTraitTest.phptests/Unit/Jobs/Crm/Sync0bjectsTest.phptests/Unit/Jobs/Crm/SyncOpportunitiesJobTest.phptests/Unit/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTest.phptests/Unit/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTraitSyncOpportuniTermt.php files changed, 924 insertions(+), 147 deletions(-)create mode 100644 tests/Feature/Services/CrClick or hold page_up + page_down to start dictatingcreate mode 100644 tests/Unit/Http/ControllePScreate mode 100644 tests/Unit/Services/Crm/H(wallukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiAPP...
|
57141
|
|
49768
|
1060
|
55
|
2026-04-17T14:03:56.183695+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-17/1776 /Users/lukas/.screenpipe/data/data/2026-04-17/1776434636183_m1.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp> 0(1o]• Tech Day Review - nowA•DOCKERAPP (-zsh)C 81DEV (docker)APP (-zsh)./raw_sql_query.sql../tests/Unit/Policies/CanAccessAiReportsTest.phpX3-zshX4-zsh• ₴5* Review :Tech Day Reviewnow - 17:00-17:30no changes added tocommit(use "git add" and/or "git commit -a")lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (master)$ git pullremote: Enumerating objects: 15,done.remote: Counting objects: 100% (15/15), done.remote: Compressing objects: 100% (15/15), done.remote: Total 15 (delta 5), reused 0 (delta 0),pack-reused 0 (from 0)Unpacking objects: 100% (15/15), 12.86 KiB | 731.00 KiB/s, done.From github.com:jiminny/appc04e334173..eb5bb80e5bmaster-> origin/master08ed383c5b..da535e5554JY-18909-automated-reports-ask-jiminny > origin/JY-18909-automated-reports-ask-jiminny4b59984896..a8959a0497JY-20695-handle-no-raw-transcript-> origin/JY-20695-handle-no-raw-transcriptUpdating 5bb8fefcba..eb5bb80e5bFast-forwardapp/Component/Activity/ActivityProcessingStateManager.php+++++++*app/Component/Activity/ActivityProcessingStateRepository.phpapp/Component/Datadog/Constants.phpapp/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTrait.phpdatabase/migrations/2026_04_16_141800_move_ai_call_scoring_to_scale_tier.phptests/Unit/Component/Activity/ActivityProcessingStateManagerTest.php1 2591 +116 +t+++++++++-8674+++++++6 files changed, 205 insertions(+), 6 deletions(-)create mode 100644 database/migrations/2026_04_16_141800_move_ai_call_scoring_to_scale_tier.phplukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (master) $co -b JY-20698-fix-SF-activity-types-on-new-playbookSwitched to a new branch 'JY-20698-fix-SF-activity-types-on-new-playbook'lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (JY-20698-fix-SF-activity-types-on-new-playbook) $ csfixmake: *** No rule to make target'cs-fix'.Stop.lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (JY-20698-fix-SF-activity-types-on-new-playbook) $ cd ..lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20698-fix-SF-activity-types-on-new-playbook) $ csfixdocker exec -it docker_lamp_1./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --using-cache=no --diffPHP CS Fixer 3.87.1 Alexander by Fabien Potencier, Dariusz Ruminskiandcontributors.PHP runtime: 8.3.30Running analysis on 7 cores with 10 files per process.Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!Loadedconfig default from ".php-cs-fixer.dist.php".5596/5596 [8831 100%100% <478Fri 17 Apr 17:03:55Ci Join Google MeetAPPFixed 0 of 5596 files in 49.418 seconds, 67.00 MB memory usedWhat's next:Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug docker_lamp_1Learn more at https://docs.docker.com/go/debug-cli/lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20698-fix-SF-activity-types-on-new-playbook) $ U...
|
NULL
|
-9176536301832109088
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp> 0(1o]• Tech Day Review - nowA•DOCKERAPP (-zsh)C 81DEV (docker)APP (-zsh)./raw_sql_query.sql../tests/Unit/Policies/CanAccessAiReportsTest.phpX3-zshX4-zsh• ₴5* Review :Tech Day Reviewnow - 17:00-17:30no changes added tocommit(use "git add" and/or "git commit -a")lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (master)$ git pullremote: Enumerating objects: 15,done.remote: Counting objects: 100% (15/15), done.remote: Compressing objects: 100% (15/15), done.remote: Total 15 (delta 5), reused 0 (delta 0),pack-reused 0 (from 0)Unpacking objects: 100% (15/15), 12.86 KiB | 731.00 KiB/s, done.From github.com:jiminny/appc04e334173..eb5bb80e5bmaster-> origin/master08ed383c5b..da535e5554JY-18909-automated-reports-ask-jiminny > origin/JY-18909-automated-reports-ask-jiminny4b59984896..a8959a0497JY-20695-handle-no-raw-transcript-> origin/JY-20695-handle-no-raw-transcriptUpdating 5bb8fefcba..eb5bb80e5bFast-forwardapp/Component/Activity/ActivityProcessingStateManager.php+++++++*app/Component/Activity/ActivityProcessingStateRepository.phpapp/Component/Datadog/Constants.phpapp/Services/Crm/Hubspot/ServiceTraits/OpportunitySyncTrait.phpdatabase/migrations/2026_04_16_141800_move_ai_call_scoring_to_scale_tier.phptests/Unit/Component/Activity/ActivityProcessingStateManagerTest.php1 2591 +116 +t+++++++++-8674+++++++6 files changed, 205 insertions(+), 6 deletions(-)create mode 100644 database/migrations/2026_04_16_141800_move_ai_call_scoring_to_scale_tier.phplukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (master) $co -b JY-20698-fix-SF-activity-types-on-new-playbookSwitched to a new branch 'JY-20698-fix-SF-activity-types-on-new-playbook'lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (JY-20698-fix-SF-activity-types-on-new-playbook) $ csfixmake: *** No rule to make target'cs-fix'.Stop.lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app/front-end (JY-20698-fix-SF-activity-types-on-new-playbook) $ cd ..lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20698-fix-SF-activity-types-on-new-playbook) $ csfixdocker exec -it docker_lamp_1./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --using-cache=no --diffPHP CS Fixer 3.87.1 Alexander by Fabien Potencier, Dariusz Ruminskiandcontributors.PHP runtime: 8.3.30Running analysis on 7 cores with 10 files per process.Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!Loadedconfig default from ".php-cs-fixer.dist.php".5596/5596 [8831 100%100% <478Fri 17 Apr 17:03:55Ci Join Google MeetAPPFixed 0 of 5596 files in 49.418 seconds, 67.00 MB memory usedWhat's next:Try Docker Debug for seamless, persistent debugging tools in any container or image → docker debug docker_lamp_1Learn more at https://docs.docker.com/go/debug-cli/lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20698-fix-SF-activity-types-on-new-playbook) $ U...
|
49766
|
|
71685
|
1717
|
12
|
2026-04-22T13:18:50.339646+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-22/1776 /Users/lukas/.screenpipe/data/data/2026-04-22/1776863930339_m2.jpg...
|
PhpStorm
|
faVsco.js – JiminnyDebugCommand.php
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20157-AJ-report-not-se Project: faVsco.js, menu
JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
1
111
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService): void
{
$from = $now->copy()->previousWeekday()->startOfDay();
$to = $now->copy()->previousWeekday()->endOfDay();
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
894
Previous Highlighted Error
Next Highlighted Error
[2026-04-22 12:56:51] local.INFO: [automated-reports] Started {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Processing daily reports {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","teamId":1,"frequency":"weekly","type":"ask_jiminny"} {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Completed {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:52] local.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43"} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport] Fetched activity IDs for saved search {"saved_search_id":1977,"user_id":143,"activity_count":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","activityCount":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","activityCount":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Dispatched not-generated notifications {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","recipientsCount":1} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [Send Report Not Generated Mail] Email sent {"uuid":"dcb12181-9de1-4ef0-9d45-fb4ea6fd0778","email":"[EMAIL]","recipientName":"Lukas Kovalik"} {"correlation_id":"fdf99c5e-56cc-4478-ab54-250fc09fb443","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:57:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"23c760c9-672e-4166-a16d-e55db7824744","trace_id":"683fff63-372b-4638-9ebe-d1b0d7cd47b9"}
[2026-04-22 12:57:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"23c760c9-672e-4166-a16d-e55db7824744","trace_id":"683fff63-372b-4638-9ebe-d1b0d7cd47b9"}
[2026-04-22 12:57:06] local.NOTICE: Monitoring start {"correlation_id":"93748590-5bcc-4b5e-82a2-9cd195faadc8","trace_id":"788e496b-9a54-46ef-a822-45932aabd9ac"}
[2026-04-22 12:57:06] local.NOTICE: Monitoring end {"correlation_id":"93748590-5bcc-4b5e-82a2-9cd195faadc8","trace_id":"788e496b-9a54-46ef-a822-45932aabd9ac"}
[2026-04-22 12:57:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"f7252a17-bc62-4f94-afe0-ccfd221e69b7","trace_id":"1592110b-35f8-420a-83a2-a24fb4d4a5fa"}
[2026-04-22 12:57:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"f7252a17-bc62-4f94-afe0-ccfd221e69b7","trace_id":"1592110b-35f8-420a-83a2-a24fb4d4a5fa"}
[2026-04-22 12:57:08] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:11] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 2 inboxes and created 1 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"a4eecb2f-a606-43af-b9bd-0941ef3f15c1","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:58:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"4f659da1-6b2c-492a-bdb8-db3789f92e86","trace_id":"5f899a25-4450-47e9-ada0-a83001bd00be"}
[2026-04-22 12:58:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"4f659da1-6b2c-492a-bdb8-db3789f92e86","trace_id":"5f899a25-4450-47e9-ada0-a83001bd00be"}
[2026-04-22 12:58:07] local.NOTICE: Monitoring start {"correlation_id":"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0","trace_id":"ad240a18-b6d7-43d8-a9a6-d56613965203"}
[2026-04-22 12:58:07] local.NOTICE: Monitoring end {"correlation_id":"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0","trace_id":"ad240a18-b6d7-43d8-a9a6-d56613965203"}
[2026-04-22 12:58:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"4739d379-46ac-41e7-a396-1365033ae798","trace_id":"bb579ad2-7e23-4512-822c-2447def47d44"}
[2026-04-22 12:58:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"4739d379-46ac-41e7-a396-1365033ae798","trace_id":"bb579ad2-7e23-4512-822c-2447def47d44"}
[2026-04-22 12:58:21] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: Processing email batch 98408 for inbox 212 {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1354,"provider":"google"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1354,"provider":"google"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db54231f2fc510","from":"Sentry <[EMAIL]>","to":"[EMAIL]","cc":null} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db54231f2fc510","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db54231f2fc510","message_id":"<[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53f91158f746","from":"Nikolay Yankov <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Push <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53f91158f746","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53f91158f746","message_id":"<jiminny/prophet/pull/490/before/542d2c39143ba7a97af460a1362f4baa33a2b957/after/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53a58ac8cee4","from":"\"claude[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53a58ac8cee4","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53a58ac8cee4","message_id":"<jiminny/prophet/pull/490/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53a03c6854a8","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53a03c6854a8","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53a03c6854a8","message_id":"<jiminny/prophet/pull/490/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53948b59b0c0","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53948b59b0c0","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53948b59b0c0","message_id":"<jiminny/prophet/pull/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53831a6e4fc5","from":"\"sonarqubecloud[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53831a6e4fc5","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53831a6e4fc5","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53521076b35f","from":"Sentry <[EMAIL]>","to":"[EMAIL]","cc":null} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53521076b35f","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53521076b35f","message_id":"<[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532f4c2523b0","from":"\"claude[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532f4c2523b0","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532f4c2523b0","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532f07d5af3b","from":"Nikolay Yankov <[EMAIL]>","to":"\"jiminny/app\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532f07d5af3b","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532f07d5af3b","message_id":"<jiminny/app/pull/12001/issue_event/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532ebf72fc9e","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/app\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532ebf72fc9e","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532ebf72fc9e","message_id":"<jiminny/app/pull/12001/review/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db5329f655605f","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db5329f655605f","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db5329f655605f","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db5327670e5485","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db5327670e5485","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db5327670e5485","message_id":"<jiminny/prophet/pull/489/issue_event/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53231f82ecf7","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Push <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53231f82ecf7","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53231f82ecf7","message_id":"<jiminny/prophet/pull/489/before/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4/after/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20157-AJ-report-not-send-notification, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.10139628,"height":0.025538707},"help_text":"Git Branch: JY-20157-AJ-report-not-send-notification","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8081782,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AskJiminnyReportActivityServiceTest","depth":6,"bounds":{"left":0.8234708,"top":0.019952115,"width":0.09208777,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AskJiminnyReportActivityServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.40093085,"top":0.15003991,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.41023937,"top":0.15003991,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"111","depth":4,"bounds":{"left":0.4195479,"top":0.15003991,"width":0.010638298,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"3","depth":4,"bounds":{"left":0.43218085,"top":0.15003991,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4418218,"top":0.14844373,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.44913563,"top":0.14844373,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService): void\n {\n \n $from = $now->copy()->previousWeekday()->startOfDay();\n $to = $now->copy()->previousWeekday()->endOfDay();\n \n \n \n \n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Jiminny\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse InvalidArgumentException;\nuse Jiminny\\Jobs\\AutomatedReports\\RequestGenerateAskJiminnyReportJob;\nuse Jiminny\\Jobs\\AutomatedReports\\SendReportMailJob;\nuse Jiminny\\Jobs\\JobDispatcherInterface;\nuse Jiminny\\Models\\Activity;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Services\\Activity\\CrmOwnerResolver;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\n\n/**\n * Class JiminnyDebugCommand\n *\n * @package Jiminny\\Console\\Commands\n */\nclass JiminnyDebugCommand extends Command\n{\n public const string FREQUENCY_DAILY = 'daily';\n public const string FREQUENCY_WEEKLY = 'weekly';\n public const string FREQUENCY_MONTHLY = 'monthly';\n public const string FREQUENCY_QUARTERLY = 'quarterly';\n public const string FREQUENCY_ONE_OFF = 'one_off';\n protected $signature = 'jiminny:debug';\n\n public function handle(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService): void\n {\n \n $from = $now->copy()->previousWeekday()->startOfDay();\n $to = $now->copy()->previousWeekday()->endOfDay();\n \n \n \n \n $report = AutomatedReport::find(71);\n\n $job = new RequestGenerateAskJiminnyReportJob($report->getUuid());\n $jobDispatcher->dispatch($job);\n\n exit(1);\n\n\n // $this->formatDate($jobDispatcher);\n // $this->sendMail($jobDispatcher, $automatedReportsService);\n // $this->crmService();\n\n $this->getPayload($automatedReportsService);\n\n exit(1);\n }\n\n\n\n private function crmService()\n {\n $activity = Activity::find(418141);\n\n $team = Team::find(19);\n $config = $team->getCrmConfiguration();\n\n $crmResolver = app(CrmOwnerResolver::class, [\n 'team' => $team,\n 'integrationAdmin' => $team->getOwner(),\n 'providerSlug' => $config->getProviderName(),\n ]);\n\n $crmService = $crmResolver->prepareCrmService();\n\n $crmService->createTranscriptNotes($activity);\n }\n\n private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)\n {\n $reportUuid = '';\n // $report = $automatedReportsService->getReportResult($reportUuid);\n $report = AutomatedReportResult::find(275);\n $validRecipients = $automatedReportsService->getValidRecipientUsers(\n $report->getReport(),\n includeJiminny: true,\n );\n\n $recipient = $validRecipients[0];\n\n $fileName = $automatedReportsService->getReportFileName($report);\n $typeName = $report->getReport()->getCustomName()\n ?? $automatedReportsService->getReportTypeName($report);\n $teamsName = $automatedReportsService->getReportTeamsName($report);\n $periodName = $automatedReportsService->getReportPeriodName($report);\n $s3Path = $automatedReportsService->getMediaPath($report);\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));\n\n $jobDispatcher->dispatch(\n new SendReportMailJob(\n reportUuid: $report->getUuid(),\n s3Path: $s3Path,\n recipientEmail: $recipient['email'],\n recipientName: $recipient['name'] ?? null,\n fileName: $fileName,\n typeName: $typeName,\n teamsName: $teamsName,\n periodName: $periodName,\n isAskJiminny: true,\n )\n );\n\n exit(1);\n }\n\n private function formatDate(JobDispatcherInterface $jobDispatcher): void\n {\n $customName = 'Custom report name';\n // $frequency = self::FREQUENCY_DAILY;\n // $frequency = self::FREQUENCY_WEEKLY;\n $frequency = self::FREQUENCY_MONTHLY;\n // $frequency = self::FREQUENCY_QUARTERLY;\n // $frequency = self::FREQUENCY_ONE_OFF;\n $period = $this->calculateFromAndToDatePeriod($frequency);\n $from = $period['fromDate'];\n $to = $period['toDate'];\n $periodName = $this->formatReportPeriodName($frequency, $from, $to);\n $filenameSuffix = null;\n\n if ($customName) {\n if ($filenameSuffix) {\n $customName .= \" {$filenameSuffix}\";\n }\n\n $result = $this->sanitizeFileName(\"{$customName} - {$periodName}\");\n }\n\n $this->info($result);\n }\n\n public function calculateFromAndToDatePeriod(\n string $frequency,\n ?Carbon $fromDate = null,\n ?Carbon $toDate = null\n ): array {\n if ($frequency === self::FREQUENCY_ONE_OFF) {\n return [\n 'fromDate' => $fromDate,\n 'toDate' => $toDate,\n ];\n }\n\n $now = Carbon::now();\n\n return match ($frequency) {\n self::FREQUENCY_DAILY => [\n 'fromDate' => $now->copy()->subDay()->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_WEEKLY => [\n 'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_MONTHLY => [\n 'fromDate' => $now->copy()->subMonths(1)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n self::FREQUENCY_QUARTERLY => [\n 'fromDate' => $now->copy()->subMonths(3)->startOfDay(),\n 'toDate' => $now->copy()->subDay()->endOfDay(),\n ],\n default => throw new InvalidArgumentException(\"Unsupported frequency: {$frequency}\"),\n };\n }\n\n private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string\n {\n $fromYear = $from->format('Y');\n $toYear = $to->format('Y');\n $differentYears = $fromYear !== $toYear;\n\n switch ($frequency) {\n case self::FREQUENCY_DAILY:\n return $from->format('j M Y');\n\n case self::FREQUENCY_QUARTERLY:\n // 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ\n $startMonth = $from->format('M');\n $endMonth = $to->copy()->subMonth();\n $endMonthName = $endMonth->format('M');\n $endMonthYear = $endMonth->format('Y');\n\n if ($differentYears) {\n return \"{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}\";\n }\n\n return \"{$startMonth} - {$endMonthName} {$toYear}\";\n\n case self::FREQUENCY_MONTHLY:\n // 'May 2025' - monthly reports are always within the same year\n return $from->format('M Y');\n\n case self::FREQUENCY_WEEKLY:\n // '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ\n $startDay = $from->format('j');\n $endDay = $to->format('j');\n $startMonth = $from->format('M');\n $endMonth = $to->format('M');\n\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n if ($startMonth !== $endMonth) {\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n return \"{$startDay} - {$endDay} {$endMonth} {$toYear}\";\n\n case self::FREQUENCY_ONE_OFF:\n // '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ\n $startDay = $from->format('j');\n $startMonth = $from->format('M');\n $endDay = $to->format('j');\n $endMonth = $to->format('M');\n\n // If same month and year, use a format like '2-31 May 2025'\n if ($startMonth === $endMonth && ! $differentYears) {\n return \"{$startDay} - {$endDay} {$startMonth} {$toYear}\";\n }\n\n // If different years, include both years\n if ($differentYears) {\n return \"{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}\";\n }\n\n // Same year but different months\n return \"{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}\";\n\n default:\n // Default format for unknown frequencies\n return $from->format('j M Y') . ' - ' . $to->format('j M Y');\n }\n }\n\n public function sanitizeFileName(string $fileName): string\n {\n return str_replace(['/', '\\\\'], '-', $fileName);\n }\n\n private function getPayload(AutomatedReportsService $automatedReportsService)\n {\n $reportResult = AutomatedReportResult::find(269);\n $automatedReport = $reportResult->getReport();\n $activityIds = [1,2,3];\n $payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(\n automatedReport: $automatedReport,\n reportResult: $reportResult,\n activityIds: $activityIds,\n );\n\n \\Illuminate\\Support\\Facades\\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"894","depth":4,"bounds":{"left":0.6974734,"top":0.10055866,"width":0.012632979,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7117686,"top":0.09896249,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7190825,"top":0.09896249,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"[2026-04-22 12:56:51] local.INFO: [automated-reports] Started {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"teamId\":1,\"frequency\":\"weekly\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Completed {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:52] local.INFO: [AskJiminnyReport:Generate] Started {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\"} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport] Fetched activity IDs for saved search {\"saved_search_id\":1977,\"user_id\":143,\"activity_count\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"activityCount\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"activityCount\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Dispatched not-generated notifications {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"recipientsCount\":1} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [Send Report Not Generated Mail] Email sent {\"uuid\":\"dcb12181-9de1-4ef0-9d45-fb4ea6fd0778\",\"email\":\"lukas.kovalik@jiminny.com\",\"recipientName\":\"Lukas Kovalik\"} {\"correlation_id\":\"fdf99c5e-56cc-4478-ab54-250fc09fb443\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:57:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"23c760c9-672e-4166-a16d-e55db7824744\",\"trace_id\":\"683fff63-372b-4638-9ebe-d1b0d7cd47b9\"}\n[2026-04-22 12:57:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"23c760c9-672e-4166-a16d-e55db7824744\",\"trace_id\":\"683fff63-372b-4638-9ebe-d1b0d7cd47b9\"}\n[2026-04-22 12:57:06] local.NOTICE: Monitoring start {\"correlation_id\":\"93748590-5bcc-4b5e-82a2-9cd195faadc8\",\"trace_id\":\"788e496b-9a54-46ef-a822-45932aabd9ac\"}\n[2026-04-22 12:57:06] local.NOTICE: Monitoring end {\"correlation_id\":\"93748590-5bcc-4b5e-82a2-9cd195faadc8\",\"trace_id\":\"788e496b-9a54-46ef-a822-45932aabd9ac\"}\n[2026-04-22 12:57:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f7252a17-bc62-4f94-afe0-ccfd221e69b7\",\"trace_id\":\"1592110b-35f8-420a-83a2-a24fb4d4a5fa\"}\n[2026-04-22 12:57:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f7252a17-bc62-4f94-afe0-ccfd221e69b7\",\"trace_id\":\"1592110b-35f8-420a-83a2-a24fb4d4a5fa\"}\n[2026-04-22 12:57:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:11] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 2 inboxes and created 1 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"a4eecb2f-a606-43af-b9bd-0941ef3f15c1\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:58:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4f659da1-6b2c-492a-bdb8-db3789f92e86\",\"trace_id\":\"5f899a25-4450-47e9-ada0-a83001bd00be\"}\n[2026-04-22 12:58:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4f659da1-6b2c-492a-bdb8-db3789f92e86\",\"trace_id\":\"5f899a25-4450-47e9-ada0-a83001bd00be\"}\n[2026-04-22 12:58:07] local.NOTICE: Monitoring start {\"correlation_id\":\"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0\",\"trace_id\":\"ad240a18-b6d7-43d8-a9a6-d56613965203\"}\n[2026-04-22 12:58:07] local.NOTICE: Monitoring end {\"correlation_id\":\"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0\",\"trace_id\":\"ad240a18-b6d7-43d8-a9a6-d56613965203\"}\n[2026-04-22 12:58:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4739d379-46ac-41e7-a396-1365033ae798\",\"trace_id\":\"bb579ad2-7e23-4512-822c-2447def47d44\"}\n[2026-04-22 12:58:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4739d379-46ac-41e7-a396-1365033ae798\",\"trace_id\":\"bb579ad2-7e23-4512-822c-2447def47d44\"}\n[2026-04-22 12:58:21] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: Processing email batch 98408 for inbox 212 {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1354,\"provider\":\"google\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1354,\"provider\":\"google\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db54231f2fc510\",\"from\":\"Sentry <noreply@md.getsentry.com>\",\"to\":\"lukas.kovalik@jiminny.com\",\"cc\":null} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"noreply@md.getsentry.com\",\"inbox_id\":212,\"message_provider_id\":\"19db54231f2fc510\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db54231f2fc510\",\"message_id\":\"<20260422125504.54.22769@md.getsentry.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53f91158f746\",\"from\":\"Nikolay Yankov <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53f91158f746\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53f91158f746\",\"message_id\":\"<jiminny/prophet/pull/490/before/542d2c39143ba7a97af460a1362f4baa33a2b957/after/4c66e1fd17f3eaa5da781579d395d90b8e484e5f@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53a58ac8cee4\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53a58ac8cee4\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53a58ac8cee4\",\"message_id\":\"<jiminny/prophet/pull/490/c4296316549@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53a03c6854a8\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53a03c6854a8\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53a03c6854a8\",\"message_id\":\"<jiminny/prophet/pull/490/c4296314500@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53948b59b0c0\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53948b59b0c0\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53948b59b0c0\",\"message_id\":\"<jiminny/prophet/pull/490@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53831a6e4fc5\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53831a6e4fc5\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53831a6e4fc5\",\"message_id\":\"<jiminny/prophet/pull/489/c4296301764@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53521076b35f\",\"from\":\"Sentry <noreply@md.getsentry.com>\",\"to\":\"lukas.kovalik@jiminny.com\",\"cc\":null} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"noreply@md.getsentry.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53521076b35f\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53521076b35f\",\"message_id\":\"<20260422124049.58.92582@md.getsentry.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532f4c2523b0\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532f4c2523b0\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532f4c2523b0\",\"message_id\":\"<jiminny/prophet/pull/489/c4296266636@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532f07d5af3b\",\"from\":\"Nikolay Yankov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532f07d5af3b\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532f07d5af3b\",\"message_id\":\"<jiminny/app/pull/12001/issue_event/24755392568@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532ebf72fc9e\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532ebf72fc9e\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532ebf72fc9e\",\"message_id\":\"<jiminny/app/pull/12001/review/4154698230@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5329f655605f\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5329f655605f\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5329f655605f\",\"message_id\":\"<jiminny/prophet/pull/489/c4296264569@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5327670e5485\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5327670e5485\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5327670e5485\",\"message_id\":\"<jiminny/prophet/pull/489/issue_event/24755374104@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53231f82ecf7\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53231f82ecf7\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53231f82ecf7\",\"message_id\":\"<jiminny/prophet/pull/489/before/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4/after/7b9fcebd74a7ee16acdf5254a90fb915e7d8e7f4@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53066524151a\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53066524151a\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53066524151a\",\"message_id\":\"<jiminny/app/pull/12002/c4296250579@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52f967ce8335\",\"from\":\"Nikolay Nikolov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52f967ce8335\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52f967ce8335\",\"message_id\":\"<jiminny/app/pull/12002/c4296245889@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52ec7bab1aec\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52ec7bab1aec\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52ec7bab1aec\",\"message_id\":\"<jiminny/app/pull/11955/c4296240890@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52dc2ad7f59b\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52dc2ad7f59b\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52dc2ad7f59b\",\"message_id\":\"<jiminny/prophet/pull/489/c4296233907@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52bcbf92c079\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52bcbf92c079\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52bcbf92c079\",\"message_id\":\"<jiminny/app/pull/12002/c4296218141@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db527e19d34aa4\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db527e19d34aa4\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db527e19d34aa4\",\"message_id\":\"<jiminny/app/pull/12001/c4296191882@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db527813058831\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db527813058831\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db527813058831\",\"message_id\":\"<jiminny/prophet/pull/489/before/db24d5c8f447d154c655d67b28eb9fb4d5b42cd9/after/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5210adcd9c44\",\"from\":\"Nikolay Nikolov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5210adcd9c44\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5210adcd9c44\",\"message_id\":\"<jiminny/app/pull/12002@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52029f4c8187\",\"from\":\"James Graham <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52029f4c8187\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52029f4c8187\",\"message_id\":\"<jiminny/app/pull/11955/before/ddb985e22633ef39091cc23f7dae3d6fba32e944/after/dd69cef76478e76daa294eed094eb807a8050cfa@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Deleting successfully processed batch 98408 for inbox 212 {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:26] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 12:56:00, 2026-04-22 12:58:00] {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 12:56:00, 2026-04-22 12:58:00] {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:42] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"edf22727-1acd-40be-809c-42a2362120bd\",\"trace_id\":\"ddb5ef1c-7f3d-43f2-8b36-c4776df9fbe0\"}\n[2026-04-22 12:58:42] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"calendar:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.NOTICE: Calendar sync start {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"edf22727-1acd-40be-809c-42a2362120bd\",\"trace_id\":\"ddb5ef1c-7f3d-43f2-8b36-c4776df9fbe0\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1393,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1393,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1393,\"provider\":\"google\",\"refreshToken\":\"5aa7e2d96b53201cd16fca5d2e4ef3ad03320971fc064781d18aee3ae7b99fbf\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1393,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1393,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1387,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1387,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1387,\"provider\":\"google\",\"refreshToken\":\"8157ac6de94842937194009e9c50e459253600f799dacf6a40755ffdbeb5bba6\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1387,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1387,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1348,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1348,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1348,\"provider\":\"google\",\"refreshToken\":\"9e7d13d3032d0cb1b79d8e95aef01383e8e91eb52ff8ee960c8a0b6b95cd8c73\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1348,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1348,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1361,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1361,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1361,\"provider\":\"google\",\"refreshToken\":\"6c843da199c2b9907445329304fcc4ec5057a4ee748d8299641764395c08e1fd\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1361,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1361,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1310,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1310,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1310,\"provider\":\"google\",\"refreshToken\":\"e34818922c2830a660813a63f6169a4a9a992ae2cccd7dc8dd7796cfdb470ef1\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1310,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1310,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1333,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1333,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1333,\"provider\":\"google\",\"refreshToken\":\"6c902986546d8e8da1dc539b046cdc1d458f519acc972e5b5f1d6a1a295165e0\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1333,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1333,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1368,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1368,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1368,\"provider\":\"google\",\"refreshToken\":\"d2f128898ff8543bd16b69cfae37896ab85119b0f5ed2b431d739593bb600333\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1368,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1368,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1365,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1365,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1365,\"provider\":\"google\",\"refreshToken\":\"7676e4a9afcd082b413248ab5ec6e487021fec6a9bdf315860a59cefad9caad8\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1365,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1365,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1364,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1364,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1364,\"provider\":\"google\",\"refreshToken\":\"dd5882ebce76e645292ce33ae74238abbb77c0a4ecc6a2bfe723cad82e72ba8e\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1364,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1364,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1370,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1370,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1370,\"provider\":\"office\",\"refreshToken\":\"b7ee8035306d0043cea6e00e7c4fe14f745e44074a1194db62a31cdf8b70af3e\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1370,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 36540764-f6d1-4cc6-9765-df0e0e510500 Correlation ID: d0927a80-91e9-46ec-974b-376b47f09b96 Timestamp: 2026-04-22 12:58:49Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:49Z\\\",\\\"trace_id\\\":\\\"36540764-f6d1-4cc6-9765-df0e0e510500\\\",\\\"correlation_id\\\":\\\"d0927a80-91e9-46ec-974b-376b47f09b96\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1370,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1202,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1202,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1202,\"provider\":\"office\",\"refreshToken\":\"b458799ccc29b21a6e2eb5260fdb63e49ccba21bf942a3973fb63799bd7f0afe\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1202,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 03e21b7b-89f5-4334-82b8-fe40a9360500 Correlation ID: f1ab0f9a-7ea6-4de4-b5e9-1b6bda9a5411 Timestamp: 2026-04-22 12:58:50Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:50Z\\\",\\\"trace_id\\\":\\\"03e21b7b-89f5-4334-82b8-fe40a9360500\\\",\\\"correlation_id\\\":\\\"f1ab0f9a-7ea6-4de4-b5e9-1b6bda9a5411\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1202,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: Calendar sync job dispatched {\"calendar_id\":501} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1300,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1300,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1300,\"provider\":\"google\",\"refreshToken\":\"4b811db0725fd9602a95943519a7da935e2a5065da7d9ebfcb170752e3e1ddb8\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1300,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1300,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1409,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1409,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1409,\"provider\":\"google\",\"refreshToken\":\"e2a3f2d06894894eed1ee87d9db1ace77d4d42ee6e1288a8940ad2c10333b0c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1409,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1409,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1352,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1352,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1352,\"provider\":\"google\",\"refreshToken\":\"dd4b16b00fdc1216da6b717c02338c073636e29162826b2de6db3f064fc029eb\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1352,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1352,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1296,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1296,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1296,\"provider\":\"office\",\"refreshToken\":\"011ae723c9d800c674e0b4be76f49fc046dac7d501b66c59ef0d9549cfa56ae5\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [Calendar] Processing sync {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"from\":null,\"to\":null,\"delta\":\"CIiFh8TP44kDEIiFh8TP44kDGAUgkZvkzgIokZvkzgI=\",\"last_sync\":\"2024-12-09 07:12:53\",\"dateMode\":\"daily\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"integration-app\",\"crm_owner\":1695,\"team_id\":3143} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1296,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 25d0b704-2b97-441f-8872-7a83cf080a00 Correlation ID: f30696fa-76fc-4fef-a2a9-ce79d87f0f0f Timestamp: 2026-04-22 12:58:53Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:53Z\\\",\\\"trace_id\\\":\\\"25d0b704-2b97-441f-8872-7a83cf080a00\\\",\\\"correlation_id\\\":\\\"f30696fa-76fc-4fef-a2a9-ce79d87f0f0f\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1296,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":391,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":391,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":391,\"provider\":\"office\",\"refreshToken\":\"00045eebae0f39b34887c6d53f92ae78064f7145e1f4b67754aebd03cfb2d881\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:54] local.INFO: [Google Calendar] Failed to watch channel for calendar {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:54] local.WARNING: [Calendar] Sync failed {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":391,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 1d6725bd-cc35-45f1-a718-542f9f545400 Correlation ID: 1a55b894-6177-4e3b-9ae7-9dd3e0793aa6 Timestamp: 2026-04-22 12:58:55Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:55Z\\\",\\\"trace_id\\\":\\\"1d6725bd-cc35-45f1-a718-542f9f545400\\\",\\\"correlation_id\\\":\\\"1a55b894-6177-4e3b-9ae7-9dd3e0793aa6\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":391,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1271,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1271,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1271,\"provider\":\"office\",\"refreshToken\":\"118cde2c06993147b07ccaec4cbcd5026a819dea6c71081166a492933e392afb\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1271,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: e5bd1cd1-2188-4fe8-b57a-342c5ea25d00 Correlation ID: efdae7db-7216-411d-b08e-ed0a3798cced Timestamp: 2026-04-22 12:58:56Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:56Z\\\",\\\"trace_id\\\":\\\"e5bd1cd1-2188-4fe8-b57a-342c5ea25d00\\\",\\\"correlation_id\\\":\\\"efdae7db-7216-411d-b08e-ed0a3798cced\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1271,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1351,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1351,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1351,\"provider\":\"google\",\"refreshToken\":\"4271d15b9e60a606439caddc68337f783e472c85b03dacff14d1b6dfded9051c\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1351,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Token has been expired or revoked.\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1351,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1366,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1366,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1366,\"provider\":\"google\",\"refreshToken\":\"ae21385059b2eebfd43f68aecd56eccd702a1aabb6598f1f7ab594ed8af491b4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1366,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1366,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Calendar sync job dispatched {\"calendar_id\":378} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Calendar sync job dispatched {\"calendar_id\":504} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.NOTICE: Calendar sync end {\"retrieved_calendars\":31,\"processed_calendars\":3} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"calendar:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [Calendar] Processing sync {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"from\":null,\"to\":null,\"delta\":\"CJ_x49O3jpIDEJ_x49O3jpIDGAUgw67KlwMow67KlwM=\",\"last_sync\":\"2026-01-19 07:48:40\",\"dateMode\":\"daily\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.WARNING: [Pipedrive] Account not connected for user {\"userId\":\"e6538737-e7b4-455f-a37a-3e79b665a220\",\"account\":{\"Jiminny\\\\Models\\\\SocialAccount\":{\"id\":1116,\"sociable_id\":241,\"provider_user_id\":\"19555731\",\"expires\":1775683749,\"refresh_token_expires\":null,\"provider\":\"pipedrive\",\"state\":\"full-refresh\",\"auth_scope\":\"base,deals:full,activities:full,contacts:full,search:read\",\"retry_after\":null,\"created_at\":\"2023-09-08 09:44:29\",\"updated_at\":\"2026-04-08 22:58:34\"}}} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"pipedrive\",\"crm_owner\":241,\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"pipedrive\",\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"pipedrive\",\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.WARNING: [Calendar] CRM disconnected for user so events will not be matched {\"provider\":\"pipedrive\",\"user_id\":241,\"message\":\"Your Pipedrive account has become disconnected. Please login to Jiminny to reconnect.\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [Google Calendar] Failed to watch channel for calendar {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.WARNING: [Calendar] Sync failed {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [Calendar] Processing sync {\"calendarId\":\"9e8b1a2c-1a8f-42bd-b161-810fc0baf540\",\"from\":null,\"to\":null,\"delta\":\"R0usmcdvmMuZCBYV0hguCBHuivUdVOntZSerMNlGAd8Mh-QEjxdgu3t-Je-miimywuM6XueDQEeG_EAoMPB4JUcglRpRd2uU__kwKHxIGGLdwQZrESaJYf_mWKpVrB0AIgfFtZqdunGkG4ABZ4D8WJPwigphxHDeViHwNGs07qPw9B0ZpI_rH21q_cBjKmDZgllRuDHWKGxpeWeqs7qjVA.gepHPUlLdflV-0FfF7i_w4E9eenkrwWmyW1hNkLzXoQ\",\"last_sync\":\"2026-04-22 12:28:39\",\"dateMode\":\"daily\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1499,\"provider\":\"hubspot\",\"refreshToken\":\"96f94c623a404e02ebdbf07f1b75707bb6cdbf848cbf45d418baf608c41a8d86\",\"state\":\"connected\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountObserver] Access token was modified, encrypting {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountService] Token refreshed {\"socialAccountId\":1499,\"provider\":\"hubspot\",\"state\":\"connected\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [MS Office Calendar] Skipping delta sync for daily mode {\"calendarId\":\"9e8b1a2c-1a8f-42bd-b161-810fc0baf540\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:31] local.ERROR: Target class [Jiminny\\Repositories\\AjReportsRepository] does not exist. {\"exception\":\"[object] (Illuminate\\\\Contracts\\\\Container\\\\BindingResolutionException(code: 0): Target class [Jiminny\\\\Repositories\\\\AjReportsRepository] does not exist. at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1124)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#29 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#30 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#31 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#39 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#40 {main}\n\n[previous exception] [object] (ReflectionException(code: -1): Class \\\"Jiminny\\\\Repositories\\\\AjReportsRepository\\\" does not exist at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1122)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1122): ReflectionClass->__construct('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#29 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#30 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#31 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#39 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#40 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#41 {main}\n\"} {\"correlation_id\":\"2498dcbb-629d-44de-af9f-4c587a6c1568\",\"trace_id\":\"f91124c4-944c-4407-a18c-bc42bd477954\"}\n[2026-04-22 12:59:36] local.ERROR: Target class [Jiminny\\Repositories\\AjReportsRepository] does not exist. {\"exception\":\"[object] (Illuminate\\\\Contracts\\\\Container\\\\BindingResolutionException(code: 0): Target class [Jiminny\\\\Repositories\\\\AjReportsRepository] does not exist. at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1124)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#29 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#30 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#31 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#39 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#40 {main}\n\n[previous exception] [object] (ReflectionException(code: -1): Class \\\"Jiminny\\\\Repositories\\\\AjReportsRepository\\\" does not exist at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1122)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1122): ReflectionClass->__construct('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#29 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#30 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#31 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#39 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#40 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#41 {main}\n\"} {\"correlation_id\":\"f3b33f2f-0c3c-41b1-97a2-9b4009a9e997\",\"trace_id\":\"45643213-3dc6-40d3-a943-229aba6d6d97\"}\n[2026-04-22 13:00:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:18] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"26895f9c-162b-43cc-9529-2e05dfe3895d\",\"trace_id\":\"a39dae78-bfac-4f7e-9b1c-d8a28e4bd066\"}\n[2026-04-22 13:00:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"26895f9c-162b-43cc-9529-2e05dfe3895d\",\"trace_id\":\"a39dae78-bfac-4f7e-9b1c-d8a28e4bd066\"}\n[2026-04-22 13:00:33] local.NOTICE: Monitoring start {\"correlation_id\":\"02893a2a-7e2c-4e30-af31-4626e1dcc56f\",\"trace_id\":\"93f0e225-8602-42c2-8a61-f1c716975392\"}\n[2026-04-22 13:00:33] local.NOTICE: Monitoring end {\"correlation_id\":\"02893a2a-7e2c-4e30-af31-4626e1dcc56f\",\"trace_id\":\"93f0e225-8602-42c2-8a61-f1c716975392\"}\n[2026-04-22 13:00:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b27edd55-2a89-4b8a-a514-1267c1e8c1d9\",\"trace_id\":\"210c11d9-12db-41d6-8f7e-b45a0f82eca7\"}\n[2026-04-22 13:00:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b27edd55-2a89-4b8a-a514-1267c1e8c1d9\",\"trace_id\":\"210c11d9-12db-41d6-8f7e-b45a0f82eca7\"}\n[2026-04-22 13:00:49] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:55] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 12:58:00, 2026-04-22 13:00:00] {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 12:58:00, 2026-04-22 13:00:00] {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:01:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"eca7f0a3-5c67-4573-8143-8b487913769a\",\"trace_id\":\"b9e515b3-499a-4793-a5fd-f0e8315e6493\"}\n[2026-04-22 13:01:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"eca7f0a3-5c67-4573-8143-8b487913769a\",\"trace_id\":\"b9e515b3-499a-4793-a5fd-f0e8315e6493\"}\n[2026-04-22 13:01:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ff9d3e97-b2de-47f6-89d8-ac048d7683b4\",\"trace_id\":\"2688a8cd-4ec9-4fdf-916a-f3bebdcbd1bf\"}\n[2026-04-22 13:01:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ff9d3e97-b2de-47f6-89d8-ac048d7683b4\",\"trace_id\":\"2688a8cd-4ec9-4fdf-916a-f3bebdcbd1bf\"}\n[2026-04-22 13:01:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:19] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 12:51:00, 2026-04-22 12:56:00] {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 12:51:00, 2026-04-22 12:56:00] {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:35] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"12:56\",\"to\":\"13:01\"} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"02:51\",\"to\":\"02:56\"} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:43] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:43] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f2dd9f6e-8bac-47e4-8eeb-5e9fe7a12e1b\",\"trace_id\":\"4769977c-9ea4-4420-9843-a189f74117f3\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d0c89873-e405-4a53-88d4-272acfe4ce55\",\"trace_id\":\"db523f79-d31f-4f05-8d92-7167282a3ca2\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d0c89873-e405-4a53-88d4-272acfe4ce55\",\"trace_id\":\"db523f79-d31f-4f05-8d92-7167282a3ca2\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f2dd9f6e-8bac-47e4-8eeb-5e9fe7a12e1b\",\"trace_id\":\"4769977c-9ea4-4420-9843-a189f74117f3\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:03:57.666831Z\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:58] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1848ed6f-18ba-4f26-821b-c6a0e52a8ef3\",\"trace_id\":\"16848494-0155-48c2-b153-0d83a8a2130b\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1848ed6f-18ba-4f26-821b-c6a0e52a8ef3\",\"trace_id\":\"16848494-0155-48c2-b153-0d83a8a2130b\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811301,\"provider\":\"twilio-flex\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811302,\"provider\":\"xant\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811303,\"provider\":\"apollo\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811304,\"provider\":\"groove\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811305,\"provider\":\"twilio-video\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811306,\"provider\":\"hubspot\",\"team\":\"hubspot\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.WARNING: [Salesforce] Account not connected for user {\"userId\":\"cdf8b554-d951-4758-bc2b-c1b85d1cd0b9\",\"account\":null} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"salesforce\",\"crm_owner\":3,\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [CrmOwnerResolver] TeamMember found with active crm connection {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1194,\"provider\":\"twilio-flex\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1194,\"provider\":\"twilio-flex\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SyncActivity] Start {\"import_id\":811301,\"provider\":\"twilio-flex\",\"provider_id\":317,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.NOTICE: [TwilioFlex] Calls import start {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.ALERT: [SyncActivity] Failed {\"import_id\":811301,\"provider\":\"twilio-flex\",\"provider_id\":317,\"team\":\"jiminny\",\"team_id\":1,\"reason\":\"[HTTP 401] Unable to fetch page: Authenticate\",\"file\":\"/home/jiminny/vendor/twilio/sdk/src/Twilio/Page.php\",\"line\":60} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SyncActivity] Start {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT Playbooks_Call_Date__c,Playbooks_Call_Recording__c,CreatedDate,TaskSubtype,CallType,CallDurationInSeconds,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+Playbooks_Call_Date__c%2CPlaybooks_Call_Recording__c%2CCreatedDate%2CTaskSubtype%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Xant (InsideSales)] No calls found. {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] End {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] Memory usage {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31469584,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] Start {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT AccountId,CreatedDate,TaskSubtype,CallType,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+AccountId%2CCreatedDate%2CTaskSubtype%2CCallType%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Apollo] No calls found. {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] End {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] Memory usage {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31633656,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] Start {\"import_id\":811304,\"provider\":\"groove\",\"provider_id\":228,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT call_recording_url__c,TaskSubtype,CreatedDate,CallType,CallDurationInSeconds,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+call_recording_url__c%2CTaskSubtype%2CCreatedDate%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.ERROR: [Salesforce] Request exception [400] \nSELECT call_recording_url__c,TaskSubtype\n ^\nERROR at Row:1:Column:8\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. {\"url\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+call_recording_url__c%2CTaskSubtype%2CCreatedDate%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000\",\"data\":{\"headers\":{\"Authorization\":\"Bearer 00D2g0000008hH4!AQEAQHyufOPbAPKwYOvd5c39ZYs6JEVT_IUvgbdDZ5iMwNtUGuDAwf3epMoUD5vLlu.9AOf.7K4B3qPz2VjGLuWaHwdNRHJD\"}},\"response\":{\"GuzzleHttp\\\\Psr7\\\\Stream\":\"[{\\\"message\\\":\\\"\\\\nSELECT call_recording_url__c,TaskSubtype\\\\n ^\\\\nERROR at Row:1:Column:8\\\\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.\\\",\\\"errorCode\\\":\\\"INVALID_FIELD\\\"}]\"},\"fields\":[]} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.ALERT: [SyncActivity] Failed {\"import_id\":811304,\"provider\":\"groove\",\"provider_id\":228,\"team\":\"jiminny\",\"team_id\":1,\"reason\":\"\nSELECT call_recording_url__c,TaskSubtype\n ^\nERROR at Row:1:Column:8\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.\",\"file\":\"/home/jiminny/app/Services/Crm/Salesforce/Client.php\",\"line\":564} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] Start {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Salesforce] Performing query {\"query\":\"SELECT Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type,twilio_call_sid__c,Lead_UUID__c,Opportunity__c\n FROM Task\n WHERE Type = 'Video'\n AND isClosed = true\n AND IsDeleted = false\n AND LastModifiedDate >= :from\n AND twilio_call_sid__c != NULL AND LastModifiedDate <= :to ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=SELECT+Id%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%2Ctwilio_call_sid__c%2CLead_UUID__c%2COpportunity__c%0A++++++++++++++FROM+Task%0A++++++++++++WHERE+Type+%3D+%27Video%27%0A++++++++++++++AND+isClosed+%3D+true%0A++++++++++++++AND+IsDeleted+%3D+false%0A++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A++++++++++++++AND+twilio_call_sid__c+%21%3D+NULL+AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z+ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Twilio Video] No calls found. {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] End {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] Memory usage {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31948304,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":408,\"provider\":\"hubspot\",\"refreshToken\":\"de4e47eb985578f4218833e763e31059e88b562e87e10749b3389be2328f0aa7\",\"state\":\"connected\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountObserver] Access token was modified, encrypting {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SocialAccountService] Token refreshed {\"socialAccountId\":408,\"provider\":\"hubspot\",\"state\":\"connected\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] Start {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [HubSpot] Search calls for period {\"from\":\"2026-04-22 12:44:00\",\"to\":\"2026-04-22 13:00:00\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] End {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] Memory usage {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2,\"memory_usage\":32384296,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:fail-stalled\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4e2a76a1-e4d2-418e-a50a-25e941201f38\",\"trace_id\":\"c31965c9-daaa-4a9e-a211-0cd89722c40f\"}\n[2026-04-22 13:02:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:fail-stalled\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4e2a76a1-e4d2-418e-a50a-25e941201f38\",\"trace_id\":\"c31965c9-daaa-4a9e-a211-0cd89722c40f\"}\n[2026-04-22 13:02:40] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-stuck\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"48eff6ba-ca64-4105-a67c-f1b0b07bdf31\",\"trace_id\":\"e0244903-31d1-41cd-8aed-faf35bf63dd6\"}\n[2026-04-22 13:02:40] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-stuck\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"48eff6ba-ca64-4105-a67c-f1b0b07bdf31\",\"trace_id\":\"e0244903-31d1-41cd-8aed-faf35bf63dd6\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":57,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":289.0,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:03:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"dde0795d-49fc-40be-8036-47bf75d570ee\",\"trace_id\":\"757e2167-b7e4-4179-bb5d-8fd63c06b796\"}\n[2026-04-22 13:03:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"dde0795d-49fc-40be-8036-47bf75d570ee\",\"trace_id\":\"757e2167-b7e4-4179-bb5d-8fd63c06b796\"}\n[2026-04-22 13:03:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"97203323-4b81-4806-a2a6-103ec5d8dadf\",\"trace_id\":\"92584aa6-7163-436f-83c3-2bb006ed5c6a\"}\n[2026-04-22 13:03:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"97203323-4b81-4806-a2a6-103ec5d8dadf\",\"trace_id\":\"92584aa6-7163-436f-83c3-2bb006ed5c6a\"}\n[2026-04-22 13:03:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e42588a2-0a81-4cf7-8794-9fff56c32389\",\"trace_id\":\"455577ea-6a58-4e26-b108-f195b774425f\"}\n[2026-04-22 13:03:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e42588a2-0a81-4cf7-8794-9fff56c32389\",\"trace_id\":\"455577ea-6a58-4e26-b108-f195b774425f\"}\n[2026-04-22 13:03:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"211d6a4e-8495-4c40-8b29-b2b262d2876b\",\"trace_id\":\"37a727c7-0bc6-4b1d-892e-88bb7e97d27f\"}\n[2026-04-22 13:03:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"211d6a4e-8495-4c40-8b29-b2b262d2876b\",\"trace_id\":\"37a727c7-0bc6-4b1d-892e-88bb7e97d27f\"}\n[2026-04-22 13:03:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"83fa21ef-4709-4513-8c54-71d3de422571\",\"trace_id\":\"3a5511fd-a984-46ee-9b35-ebda4cc8026e\"}\n[2026-04-22 13:03:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"83fa21ef-4709-4513-8c54-71d3de422571\",\"trace_id\":\"3a5511fd-a984-46ee-9b35-ebda4cc8026e\"}\n[2026-04-22 13:03:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:39] local.INFO: Dispatching activity sync job {\"import_id\":811307,\"provider\":\"hubspot\",\"team\":\"hubspot\"} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] Start {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [HubSpot] Search calls for period {\"from\":\"2026-04-22 12:00:00\",\"to\":\"2026-04-22 13:00:00\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] End {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] Memory usage {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2,\"memory_usage\":32544256,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:48] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"43c720b0-251a-4551-888c-1d2ab14e0052\",\"trace_id\":\"455b5c19-0fc5-44ce-bfc9-bc2b22c3cecf\"}\n[2026-04-22 13:03:48] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"43c720b0-251a-4551-888c-1d2ab14e0052\",\"trace_id\":\"455b5c19-0fc5-44ce-bfc9-bc2b22c3cecf\"}\n[2026-04-22 13:03:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"nudges:send\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b0f1e481-6106-4dc8-9eb2-ef9275b43221\",\"trace_id\":\"c445805a-2dc8-4b56-b36a-619e8df9ea0d\"}\n[2026-04-22 13:03:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"nudges:send\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b0f1e481-6106-4dc8-9eb2-ef9275b43221\",\"trace_id\":\"c445805a-2dc8-4b56-b36a-619e8df9ea0d\"}\n[2026-04-22 13:04:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:playlists:normalize-sort\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: [Jiminny\\Component\\Playlist\\Command\\NormalizeSortCommand::handle] starting. {\"playlists\":[]} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: [Jiminny\\Component\\Playlist\\Command\\NormalizeSortCommand::handle] finished. {\"normalizedPlaylists\":[],\"deletedPlaylists\":[]} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:playlists:normalize-sort\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:05:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"80d9cf23-d699-4311-b055-fde647069da5\",\"trace_id\":\"1e1c5e76-8d24-4d40-a950-5e57196b30b9\"}\n[2026-04-22 13:05:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"80d9cf23-d699-4311-b055-fde647069da5\",\"trace_id\":\"1e1c5e76-8d24-4d40-a950-5e57196b30b9\"}\n[2026-04-22 13:05:08] local.NOTICE: Monitoring start {\"correlation_id\":\"f88ba579-1250-4736-be77-b2626f3dd5e8\",\"trace_id\":\"d559bcb8-5b20-462b-95d3-a386d0b6cddf\"}\n[2026-04-22 13:05:08] local.NOTICE: Monitoring end {\"correlation_id\":\"f88ba579-1250-4736-be77-b2626f3dd5e8\",\"trace_id\":\"d559bcb8-5b20-462b-95d3-a386d0b6cddf\"}\n[2026-04-22 13:05:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"51c4efa8-98da-4b2c-9ce6-8456ec73ed6f\",\"trace_id\":\"2d90942a-a8d0-49ae-a951-6e478801b244\"}\n[2026-04-22 13:05:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"51c4efa8-98da-4b2c-9ce6-8456ec73ed6f\",\"trace_id\":\"2d90942a-a8d0-49ae-a951-6e478801b244\"}\n[2026-04-22 13:05:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b698a551-6cef-4e0f-a6ca-43b321d118a3\",\"trace_id\":\"43da569b-05dd-4495-8feb-3677e569ccbe\"}\n[2026-04-22 13:05:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b698a551-6cef-4e0f-a6ca-43b321d118a3\",\"trace_id\":\"43da569b-05dd-4495-8feb-3677e569ccbe\"}\n[2026-04-22 13:05:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a4b0eaaf-05bd-4b13-909d-847c02155c13\",\"trace_id\":\"439cc764-b15d-4bdb-bac5-906520ff723a\"}\n[2026-04-22 13:05:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a4b0eaaf-05bd-4b13-909d-847c02155c13\",\"trace_id\":\"439cc764-b15d-4bdb-bac5-906520ff723a\"}\n[2026-04-22 13:05:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:16] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 12:55:00, 2026-04-22 13:00:00] {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 12:55:00, 2026-04-22 13:00:00] {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"13:00\",\"to\":\"13:05\"} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"02:55\",\"to\":\"03:00\"} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:38] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:40] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:40] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"0855c74a-4c1d-4500-a8a6-9aea42e1b4c3\",\"trace_id\":\"3f0e341d-9b00-427d-9d66-a90e03d39fb4\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"0dcaff9b-c757-4b47-9d31-d585ff98f093\",\"trace_id\":\"eff09743-6f3b-420a-b0ca-bce23ecc2896\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"0855c74a-4c1d-4500-a8a6-9aea42e1b4c3\",\"trace_id\":\"3f0e341d-9b00-427d-9d66-a90e03d39fb4\"}\n[2026-04-22 13:05:50] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:07:51.069944Z\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"0dcaff9b-c757-4b47-9d31-d585ff98f093\",\"trace_id\":\"eff09743-6f3b-420a-b0ca-bce23ecc2896\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:16] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1b9886f8-99e5-401c-a068-e9b09bd1cac1\",\"trace_id\":\"03b61d1f-70be-4586-a3b1-7913f59eb5a4\"}\n[2026-04-22 13:06:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1b9886f8-99e5-401c-a068-e9b09bd1cac1\",\"trace_id\":\"03b61d1f-70be-4586-a3b1-7913f59eb5a4\"}\n[2026-04-22 13:06:30] local.NOTICE: Monitoring start {\"correlation_id\":\"57876f15-2702-4e20-9f3d-c4cfdc870b28\",\"trace_id\":\"c9b182fa-de3a-4ace-a7cf-730cb8c2c31e\"}\n[2026-04-22 13:06:30] local.NOTICE: Monitoring end {\"correlation_id\":\"57876f15-2702-4e20-9f3d-c4cfdc870b28\",\"trace_id\":\"c9b182fa-de3a-4ace-a7cf-730cb8c2c31e\"}\n[2026-04-22 13:06:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a6febc04-e974-4bfe-a983-1d7cf42f40fe\",\"trace_id\":\"d8dc4a27-3357-4c8d-8899-7b3cf288a68c\"}\n[2026-04-22 13:06:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a6febc04-e974-4bfe-a983-1d7cf42f40fe\",\"trace_id\":\"d8dc4a27-3357-4c8d-8899-7b3cf288a68c\"}\n[2026-04-22 13:06:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":210.7,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:04:00, 2026-04-22 13:06:00] {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:04:00, 2026-04-22 13:06:00] {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:sync-hubspot-objects\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d47e5295-cd3e-4591-824e-53d2df0c2beb\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:sync-hubspot-objects\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d47e5295-cd3e-4591-824e-53d2df0c2beb\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"abae74b8-bfa8-4383-9a7f-89f4bf2bdbb4\",\"usage\":25990080,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":148,\"team_id\":2} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [HubSpot] Syncing opportunities using strategy: lastModified {\"team\":2} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [Hubspot] Pagination completed {\"team_id\":2,\"endpoint\":\"https://api.hubapi.com/crm/v3/objects/deals/search\",\"total_requests\":1,\"total_records_fetched\":0,\"total_elapsed_seconds\":0.69,\"average_seconds_per_request\":0.69} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [HubSpot] Synced opportunities {\"team\":2,\"strategies\":\"lastModified\",\"sync_count\":0,\"total\":0,\"last_synced_id\":null,\"duration_ms\":728.16} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"abae74b8-bfa8-4383-9a7f-89f4bf2bdbb4\",\"provider\":\"hubspot\",\"status\":\"completed\",\"duration_ms\":1228.62,\"usage\":26112136,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"b2b115eb-93ce-4d1b-929c-173757df8fba\",\"usage\":26090136,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"33e34a7a-1c02-4f04-87ac-22c3a385e6e3\",\"account\":{\"Jiminny\\\\Models\\\\SocialAccount\":{\"id\":306,\"sociable_id\":109,\"provider_user_id\":\"11348452\",\"expires\":1701077403,\"refresh_token_expires\":null,\"provider\":\"hubspot\",\"state\":\"full-refresh\",\"auth_scope\":null,\"retry_after\":null,\"created_at\":\"2020-09-01 16:59:04\",\"updated_at\":\"2023-11-27 09:30:03\"}}} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":109,\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"b2b115eb-93ce-4d1b-929c-173757df8fba\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":344.07,\"usage\":25993952,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Your HubSpot account has become disconnected. Please login to Jiminny to reconnect.\"} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"b2d49a54-b645-4637-a7ae-a86cfce6e8e4\",\"usage\":26032320,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"2ac0447f-3c8c-4ce0-baeb-b63ddb76fa9b\",\"account\":null} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":130,\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"b2d49a54-b645-4637-a7ae-a86cfce6e8e4\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":40.49,\"usage\":25968512,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Social account for HubSpot cannot be found. Please login to Jiminny to connect.\"} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"c6b9d6b0-b48d-4832-a68c-a57d60651888\",\"usage\":26006880,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"71e3aac5-fb66-47c5-a236-2d051ae3e319\",\"account\":null} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":256,\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:07] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:07] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"c6b9d6b0-b48d-4832-a68c-a57d60651888\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":68.83,\"usage\":25962344,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Social account for HubSpot cannot be found. Please login to Jiminny to connect.\"} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"93514604-b859-4696-8477-70fe4ff430e3\",\"trace_id\":\"b170a77b-f919-4bdd-a50a-8550322f145b\"}\n[2026-04-22 13:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"93514604-b859-4696-8477-70fe4ff430e3\",\"trace_id\":\"b170a77b-f919-4bdd-a50a-8550322f145b\"}\n[2026-04-22 13:07:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:17] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1e81dfe3-4f06-4ac4-ad26-328f4a459274\",\"trace_id\":\"a9e7ca99-2eef-484e-9326-24f0e0dc87c8\"}\n[2026-04-22 13:08:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1e81dfe3-4f06-4ac4-ad26-328f4a459274\",\"trace_id\":\"a9e7ca99-2eef-484e-9326-24f0e0dc87c8\"}\n[2026-04-22 13:08:34] local.NOTICE: Monitoring start {\"correlation_id\":\"57f6075b-5303-4666-8a6e-b3a52cb982d9\",\"trace_id\":\"e2f94325-354f-4875-98ff-6675361668b5\"}\n[2026-04-22 13:08:34] local.NOTICE: Monitoring end {\"correlation_id\":\"57f6075b-5303-4666-8a6e-b3a52cb982d9\",\"trace_id\":\"e2f94325-354f-4875-98ff-6675361668b5\"}\n[2026-04-22 13:08:38] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"66857633-bd66-4266-b910-5adc218e04ca\",\"trace_id\":\"3246ec2a-1e99-4e36-8a98-20f639d1e482\"}\n[2026-04-22 13:08:38] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"66857633-bd66-4266-b910-5adc218e04ca\",\"trace_id\":\"3246ec2a-1e99-4e36-8a98-20f639d1e482\"}\n[2026-04-22 13:08:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:06:00, 2026-04-22 13:08:00] {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:06:00, 2026-04-22 13:08:00] {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"5ec25648-4caf-4edb-b9b3-77be3e20f30c\",\"trace_id\":\"8d7ef3b8-99cf-4c99-93a6-29e13e05870c\"}\n[2026-04-22 13:08:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"5ec25648-4caf-4edb-b9b3-77be3e20f30c\",\"trace_id\":\"8d7ef3b8-99cf-4c99-93a6-29e13e05870c\"}\n[2026-04-22 13:09:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:11] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"cfb4293b-1233-4dc3-9278-65d6596dd776\",\"trace_id\":\"9b099edc-6409-4c88-b7be-bda278c03653\"}\n[2026-04-22 13:09:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"cfb4293b-1233-4dc3-9278-65d6596dd776\",\"trace_id\":\"9b099edc-6409-4c88-b7be-bda278c03653\"}\n[2026-04-22 13:09:18] local.NOTICE: Monitoring start {\"correlation_id\":\"bf84eee0-969c-4929-82b1-042a3e3ee9aa\",\"trace_id\":\"86a2b319-ba4c-4d27-8481-f547605d4869\"}\n[2026-04-22 13:09:18] local.NOTICE: Monitoring end {\"correlation_id\":\"bf84eee0-969c-4929-82b1-042a3e3ee9aa\",\"trace_id\":\"86a2b319-ba4c-4d27-8481-f547605d4869\"}\n[2026-04-22 13:09:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"7bc53856-0042-461a-86d2-99f1bec01c30\",\"trace_id\":\"bcd93134-5e6c-480f-a336-c04a8650b04f\"}\n[2026-04-22 13:09:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"7bc53856-0042-461a-86d2-99f1bec01c30\",\"trace_id\":\"bcd93134-5e6c-480f-a336-c04a8650b04f\"}\n[2026-04-22 13:09:27] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:30] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:33] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"9bf5c195-284c-4743-9f8e-85471ffff9d4\",\"trace_id\":\"07c25e41-cab6-4714-b5e7-63bc7268336a\"}\n[2026-04-22 13:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:23] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d37b707d-a482-413f-9ce1-53b00ea3d824\",\"trace_id\":\"ebd74efd-d278-41a5-8825-4c7132fa7ff8\"}\n[2026-04-22 13:10:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d37b707d-a482-413f-9ce1-53b00ea3d824\",\"trace_id\":\"ebd74efd-d278-41a5-8825-4c7132fa7ff8\"}\n[2026-04-22 13:10:40] local.NOTICE: Monitoring start {\"correlation_id\":\"4f57d92f-53a9-4804-bec7-172ec05d9f8b\",\"trace_id\":\"79a93f08-f137-46f9-953d-ce661080a74d\"}\n[2026-04-22 13:10:41] local.NOTICE: Monitoring end {\"correlation_id\":\"4f57d92f-53a9-4804-bec7-172ec05d9f8b\",\"trace_id\":\"79a93f08-f137-46f9-953d-ce661080a74d\"}\n[2026-04-22 13:10:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9de580f9-f066-4265-9fa0-97b8ea715fc1\",\"trace_id\":\"9f8f2c76-5ef8-45cb-8da6-5fed79febe74\"}\n[2026-04-22 13:10:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9de580f9-f066-4265-9fa0-97b8ea715fc1\",\"trace_id\":\"9f8f2c76-5ef8-45cb-8da6-5fed79febe74\"}\n[2026-04-22 13:10:59] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:11:01] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:09:00, 2026-04-22 13:11:00] {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:09:00, 2026-04-22 13:11:00] {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"82116a10-265d-43d4-b0cb-4f0b9b3cd20b\",\"trace_id\":\"1b064487-86b2-49dd-a964-e33aa4d823a2\"}\n[2026-04-22 13:11:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"82116a10-265d-43d4-b0cb-4f0b9b3cd20b\",\"trace_id\":\"1b064487-86b2-49dd-a964-e33aa4d823a2\"}\n[2026-04-22 13:11:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b6adf6d5-64ea-48d9-9a97-25da71181eee\",\"trace_id\":\"61f36ae5-2999-4ce9-90ee-9c6e72a86658\"}\n[2026-04-22 13:11:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b6adf6d5-64ea-48d9-9a97-25da71181eee\",\"trace_id\":\"61f36ae5-2999-4ce9-90ee-9c6e72a86658\"}\n[2026-04-22 13:11:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:07] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 13:01:00, 2026-04-22 13:06:00] {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 13:01:00, 2026-04-22 13:06:00] {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"13:06\",\"to\":\"13:11\"} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"03:01\",\"to\":\"03:06\"} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:13] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d2635e96-e7ee-4241-bb3f-9b2aeace0557\",\"trace_id\":\"d8169f7e-dd29-450a-bd52-098d1fea2512\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d2635e96-e7ee-4241-bb3f-9b2aeace0557\",\"trace_id\":\"d8169f7e-dd29-450a-bd52-098d1fea2512\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"3a977f84-7d65-4224-95b5-b18effb33083\",\"trace_id\":\"f48ac83a-e7f0-49f4-b7e3-15881e427646\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"3a977f84-7d65-4224-95b5-b18effb33083\",\"trace_id\":\"f48ac83a-e7f0-49f4-b7e3-15881e427646\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:13:17.982589Z\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:18] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ae02fafd-ce2b-4735-ad77-2dfc800d33fb\",\"trace_id\":\"e6aa5a99-c60b-4cad-bc38-c353b8cf2ff0\"}\n[2026-04-22 13:11:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ae02fafd-ce2b-4735-ad77-2dfc800d33fb\",\"trace_id\":\"e6aa5a99-c60b-4cad-bc38-c353b8cf2ff0\"}\n[2026-04-22 13:11:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"55978b4e-7eeb-4466-825a-f001afeaa3aa\",\"trace_id\":\"2006d56f-acee-4f75-a195-b9dfc24c05c7\"}\n[2026-04-22 13:11:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"55978b4e-7eeb-4466-825a-f001afeaa3aa\",\"trace_id\":\"2006d56f-acee-4f75-a195-b9dfc24c05c7\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Auth] Requesting new client credentials token {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Auth] Successfully obtained new access token {\"expires_in\":1800,\"cached_for\":1500} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":57,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":267.6,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:18] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"513c9a98-3234-4d38-b190-e95cfaab2fa2\",\"trace_id\":\"8ac119db-bd87-4950-97f9-612b4bed8744\"}\n[2026-04-22 13:12:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"513c9a98-3234-4d38-b190-e95cfaab2fa2\",\"trace_id\":\"8ac119db-bd87-4950-97f9-612b4bed8744\"}\n[2026-04-22 13:12:36] local.NOTICE: Monitoring start {\"correlation_id\":\"1bfff069-f28b-4112-88ae-6323b4fa6e52\",\"trace_id\":\"a12a9006-d9e6-4df2-9570-452c6cbca611\"}\n[2026-04-22 13:12:37] local.NOTICE: Monitoring end {\"correlation_id\":\"1bfff069-f28b-4112-88ae-6323b4fa6e52\",\"trace_id\":\"a12a9006-d9e6-4df2-9570-452c6cbca611\"}\n[2026-04-22 13:12:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d97cb859-4b21-4e6c-a34e-784f1da94521\",\"trace_id\":\"190525e9-8a30-493b-ba43-eeb48653bcc9\"}\n[2026-04-22 13:12:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d97cb859-4b21-4e6c-a34e-784f1da94521\",\"trace_id\":\"190525e9-8a30-493b-ba43-eeb48653bcc9\"}","depth":4,"value":"[2026-04-22 12:56:51] local.INFO: [automated-reports] Started {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Checking conditions {\"isMonday\":false,\"isFirstDayOfMonth\":false,\"currentMonth\":4,\"isQuarterlyMonth\":true} {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Processing daily reports {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Found 1 daily reports to process {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Dispatching Generate Report job for report {\"reportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"teamId\":1,\"frequency\":\"weekly\",\"type\":\"ask_jiminny\"} {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:51] local.INFO: [automated-reports] Completed {\"correlation_id\":\"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:52] local.INFO: [AskJiminnyReport:Generate] Started {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\"} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport] Fetched activity IDs for saved search {\"saved_search_id\":1977,\"user_id\":143,\"activity_count\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"activityCount\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"activityCount\":0} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Dispatched not-generated notifications {\"automatedReportUuid\":\"4f6ca2b5-1993-48aa-99ad-b66f19f15d43\",\"recipientsCount\":1} {\"correlation_id\":\"8a73461c-4e2b-4f6d-81f0-40367c09822d\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:56:53] local.INFO: [Send Report Not Generated Mail] Email sent {\"uuid\":\"dcb12181-9de1-4ef0-9d45-fb4ea6fd0778\",\"email\":\"lukas.kovalik@jiminny.com\",\"recipientName\":\"Lukas Kovalik\"} {\"correlation_id\":\"fdf99c5e-56cc-4478-ab54-250fc09fb443\",\"trace_id\":\"63846b9c-c6ed-499e-8469-25c651aaf84f\"}\n[2026-04-22 12:57:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"8f891f7b-2c3d-4813-a810-922d3c3ff04b\",\"trace_id\":\"7ea4600f-fe5e-4041-8ef1-207cf5dfacba\"}\n[2026-04-22 12:57:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"23c760c9-672e-4166-a16d-e55db7824744\",\"trace_id\":\"683fff63-372b-4638-9ebe-d1b0d7cd47b9\"}\n[2026-04-22 12:57:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"23c760c9-672e-4166-a16d-e55db7824744\",\"trace_id\":\"683fff63-372b-4638-9ebe-d1b0d7cd47b9\"}\n[2026-04-22 12:57:06] local.NOTICE: Monitoring start {\"correlation_id\":\"93748590-5bcc-4b5e-82a2-9cd195faadc8\",\"trace_id\":\"788e496b-9a54-46ef-a822-45932aabd9ac\"}\n[2026-04-22 12:57:06] local.NOTICE: Monitoring end {\"correlation_id\":\"93748590-5bcc-4b5e-82a2-9cd195faadc8\",\"trace_id\":\"788e496b-9a54-46ef-a822-45932aabd9ac\"}\n[2026-04-22 12:57:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f7252a17-bc62-4f94-afe0-ccfd221e69b7\",\"trace_id\":\"1592110b-35f8-420a-83a2-a24fb4d4a5fa\"}\n[2026-04-22 12:57:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f7252a17-bc62-4f94-afe0-ccfd221e69b7\",\"trace_id\":\"1592110b-35f8-420a-83a2-a24fb4d4a5fa\"}\n[2026-04-22 12:57:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb\",\"trace_id\":\"1178bb4a-0ff0-4592-8041-c44780544424\"}\n[2026-04-22 12:57:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: [EmailSchedule] STARTING batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: [EmailSchedule] FINISHED batch create {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:create\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"bd79807d-f781-4ab2-a534-de2e8817a0c3\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:57:11] local.INFO: [Jiminny\\Jobs\\Mailbox\\CreateBatches] processed 2 inboxes and created 1 batches {\"userId\":null,\"batchSize\":30,\"maxBatches\":1000} {\"correlation_id\":\"a4eecb2f-a606-43af-b9bd-0941ef3f15c1\",\"trace_id\":\"cfcd8a63-b93b-4b43-a262-f99f08865655\"}\n[2026-04-22 12:58:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2893f84a-555c-4fc8-a8c8-128c7e3ffc21\",\"trace_id\":\"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007\"}\n[2026-04-22 12:58:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4f659da1-6b2c-492a-bdb8-db3789f92e86\",\"trace_id\":\"5f899a25-4450-47e9-ada0-a83001bd00be\"}\n[2026-04-22 12:58:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4f659da1-6b2c-492a-bdb8-db3789f92e86\",\"trace_id\":\"5f899a25-4450-47e9-ada0-a83001bd00be\"}\n[2026-04-22 12:58:07] local.NOTICE: Monitoring start {\"correlation_id\":\"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0\",\"trace_id\":\"ad240a18-b6d7-43d8-a9a6-d56613965203\"}\n[2026-04-22 12:58:07] local.NOTICE: Monitoring end {\"correlation_id\":\"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0\",\"trace_id\":\"ad240a18-b6d7-43d8-a9a6-d56613965203\"}\n[2026-04-22 12:58:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4739d379-46ac-41e7-a396-1365033ae798\",\"trace_id\":\"bb579ad2-7e23-4512-822c-2447def47d44\"}\n[2026-04-22 12:58:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4739d379-46ac-41e7-a396-1365033ae798\",\"trace_id\":\"bb579ad2-7e23-4512-822c-2447def47d44\"}\n[2026-04-22 12:58:21] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: Processing email batch 98408 for inbox 212 {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1354,\"provider\":\"google\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1354,\"provider\":\"google\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db54231f2fc510\",\"from\":\"Sentry <noreply@md.getsentry.com>\",\"to\":\"lukas.kovalik@jiminny.com\",\"cc\":null} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"noreply@md.getsentry.com\",\"inbox_id\":212,\"message_provider_id\":\"19db54231f2fc510\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db54231f2fc510\",\"message_id\":\"<20260422125504.54.22769@md.getsentry.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53f91158f746\",\"from\":\"Nikolay Yankov <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53f91158f746\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53f91158f746\",\"message_id\":\"<jiminny/prophet/pull/490/before/542d2c39143ba7a97af460a1362f4baa33a2b957/after/4c66e1fd17f3eaa5da781579d395d90b8e484e5f@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53a58ac8cee4\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53a58ac8cee4\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53a58ac8cee4\",\"message_id\":\"<jiminny/prophet/pull/490/c4296316549@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53a03c6854a8\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53a03c6854a8\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53a03c6854a8\",\"message_id\":\"<jiminny/prophet/pull/490/c4296314500@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53948b59b0c0\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53948b59b0c0\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53948b59b0c0\",\"message_id\":\"<jiminny/prophet/pull/490@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53831a6e4fc5\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53831a6e4fc5\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53831a6e4fc5\",\"message_id\":\"<jiminny/prophet/pull/489/c4296301764@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53521076b35f\",\"from\":\"Sentry <noreply@md.getsentry.com>\",\"to\":\"lukas.kovalik@jiminny.com\",\"cc\":null} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"noreply@md.getsentry.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53521076b35f\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53521076b35f\",\"message_id\":\"<20260422124049.58.92582@md.getsentry.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532f4c2523b0\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532f4c2523b0\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532f4c2523b0\",\"message_id\":\"<jiminny/prophet/pull/489/c4296266636@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532f07d5af3b\",\"from\":\"Nikolay Yankov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532f07d5af3b\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532f07d5af3b\",\"message_id\":\"<jiminny/app/pull/12001/issue_event/24755392568@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db532ebf72fc9e\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db532ebf72fc9e\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db532ebf72fc9e\",\"message_id\":\"<jiminny/app/pull/12001/review/4154698230@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5329f655605f\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5329f655605f\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5329f655605f\",\"message_id\":\"<jiminny/prophet/pull/489/c4296264569@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5327670e5485\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Review requested <review_requested@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5327670e5485\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5327670e5485\",\"message_id\":\"<jiminny/prophet/pull/489/issue_event/24755374104@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53231f82ecf7\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Lukas Kovalik <kovaliklukas@gmail.com>, Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53231f82ecf7\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53231f82ecf7\",\"message_id\":\"<jiminny/prophet/pull/489/before/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4/after/7b9fcebd74a7ee16acdf5254a90fb915e7d8e7f4@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db53066524151a\",\"from\":\"\\\"claude[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db53066524151a\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db53066524151a\",\"message_id\":\"<jiminny/app/pull/12002/c4296250579@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52f967ce8335\",\"from\":\"Nikolay Nikolov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52f967ce8335\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52f967ce8335\",\"message_id\":\"<jiminny/app/pull/12002/c4296245889@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52ec7bab1aec\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52ec7bab1aec\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52ec7bab1aec\",\"message_id\":\"<jiminny/app/pull/11955/c4296240890@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52dc2ad7f59b\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52dc2ad7f59b\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52dc2ad7f59b\",\"message_id\":\"<jiminny/prophet/pull/489/c4296233907@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52bcbf92c079\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52bcbf92c079\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52bcbf92c079\",\"message_id\":\"<jiminny/app/pull/12002/c4296218141@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db527e19d34aa4\",\"from\":\"\\\"sonarqubecloud[bot]\\\" <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db527e19d34aa4\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db527e19d34aa4\",\"message_id\":\"<jiminny/app/pull/12001/c4296191882@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db527813058831\",\"from\":\"steliyan-g <notifications@github.com>\",\"to\":\"\\\"jiminny/prophet\\\" <prophet@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db527813058831\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db527813058831\",\"message_id\":\"<jiminny/prophet/pull/489/before/db24d5c8f447d154c655d67b28eb9fb4d5b42cd9/after/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db5210adcd9c44\",\"from\":\"Nikolay Nikolov <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Subscribed <subscribed@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db5210adcd9c44\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db5210adcd9c44\",\"message_id\":\"<jiminny/app/pull/12002@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {\"batch\":98408,\"inbox_id\":212,\"email\":\"lukas.kovalik@jiminny.com\",\"email_id\":\"19db52029f4c8187\",\"from\":\"James Graham <notifications@github.com>\",\"to\":\"\\\"jiminny/app\\\" <app@noreply.github.com>\",\"cc\":\"Push <push@noreply.github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsResolver] The sender email is blacklisted, skipping {\"email\":\"notifications@github.com\",\"inbox_id\":212,\"message_provider_id\":\"19db52029f4c8187\",\"team_id\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: [EmailImport\\ParticipantsValidator] Email participants are less than 2 {\"inbox_id\":212,\"message_provider_id\":\"19db52029f4c8187\",\"message_id\":\"<jiminny/app/pull/11955/before/ddb985e22633ef39091cc23f7dae3d6fba32e944/after/dd69cef76478e76daa294eed094eb807a8050cfa@github.com>\"} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:25] local.INFO: Deleting successfully processed batch 98408 for inbox 212 {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:26] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":1} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b4d5498b-7884-4951-b407-0f04e87c7643\",\"trace_id\":\"64cef288-27e5-4a85-92bb-6f3ea826f4c1\"}\n[2026-04-22 12:58:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 12:56:00, 2026-04-22 12:58:00] {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 12:56:00, 2026-04-22 12:58:00] {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"051f34b0-38de-4d3d-b682-b75a4f90f8ee\",\"trace_id\":\"2439da3c-5330-44e5-87d6-966bf362da5f\"}\n[2026-04-22 12:58:42] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"edf22727-1acd-40be-809c-42a2362120bd\",\"trace_id\":\"ddb5ef1c-7f3d-43f2-8b36-c4776df9fbe0\"}\n[2026-04-22 12:58:42] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"calendar:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.NOTICE: Calendar sync start {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"edf22727-1acd-40be-809c-42a2362120bd\",\"trace_id\":\"ddb5ef1c-7f3d-43f2-8b36-c4776df9fbe0\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1393,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1393,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:43] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1393,\"provider\":\"google\",\"refreshToken\":\"5aa7e2d96b53201cd16fca5d2e4ef3ad03320971fc064781d18aee3ae7b99fbf\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1393,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1393,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1387,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1387,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1387,\"provider\":\"google\",\"refreshToken\":\"8157ac6de94842937194009e9c50e459253600f799dacf6a40755ffdbeb5bba6\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1387,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1387,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1348,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1348,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1348,\"provider\":\"google\",\"refreshToken\":\"9e7d13d3032d0cb1b79d8e95aef01383e8e91eb52ff8ee960c8a0b6b95cd8c73\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1348,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:44] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1348,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1361,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1361,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1361,\"provider\":\"google\",\"refreshToken\":\"6c843da199c2b9907445329304fcc4ec5057a4ee748d8299641764395c08e1fd\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1361,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1361,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1310,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1310,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1310,\"provider\":\"google\",\"refreshToken\":\"e34818922c2830a660813a63f6169a4a9a992ae2cccd7dc8dd7796cfdb470ef1\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1310,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:45] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1310,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1333,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1333,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1333,\"provider\":\"google\",\"refreshToken\":\"6c902986546d8e8da1dc539b046cdc1d458f519acc972e5b5f1d6a1a295165e0\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1333,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1333,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1368,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1368,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1368,\"provider\":\"google\",\"refreshToken\":\"d2f128898ff8543bd16b69cfae37896ab85119b0f5ed2b431d739593bb600333\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1368,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:46] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1368,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1365,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1365,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1365,\"provider\":\"google\",\"refreshToken\":\"7676e4a9afcd082b413248ab5ec6e487021fec6a9bdf315860a59cefad9caad8\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1365,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1365,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1364,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1364,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:47] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1364,\"provider\":\"google\",\"refreshToken\":\"dd5882ebce76e645292ce33ae74238abbb77c0a4ecc6a2bfe723cad82e72ba8e\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1364,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1364,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1370,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1370,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:48] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1370,\"provider\":\"office\",\"refreshToken\":\"b7ee8035306d0043cea6e00e7c4fe14f745e44074a1194db62a31cdf8b70af3e\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1370,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 36540764-f6d1-4cc6-9765-df0e0e510500 Correlation ID: d0927a80-91e9-46ec-974b-376b47f09b96 Timestamp: 2026-04-22 12:58:49Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:49Z\\\",\\\"trace_id\\\":\\\"36540764-f6d1-4cc6-9765-df0e0e510500\\\",\\\"correlation_id\\\":\\\"d0927a80-91e9-46ec-974b-376b47f09b96\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1370,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1202,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1202,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:49] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1202,\"provider\":\"office\",\"refreshToken\":\"b458799ccc29b21a6e2eb5260fdb63e49ccba21bf942a3973fb63799bd7f0afe\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1202,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 03e21b7b-89f5-4334-82b8-fe40a9360500 Correlation ID: f1ab0f9a-7ea6-4de4-b5e9-1b6bda9a5411 Timestamp: 2026-04-22 12:58:50Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:50Z\\\",\\\"trace_id\\\":\\\"03e21b7b-89f5-4334-82b8-fe40a9360500\\\",\\\"correlation_id\\\":\\\"f1ab0f9a-7ea6-4de4-b5e9-1b6bda9a5411\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1202,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: Calendar sync job dispatched {\"calendar_id\":501} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1300,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1300,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:50] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1300,\"provider\":\"google\",\"refreshToken\":\"4b811db0725fd9602a95943519a7da935e2a5065da7d9ebfcb170752e3e1ddb8\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1300,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Account has been deleted\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1300,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1409,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1409,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1409,\"provider\":\"google\",\"refreshToken\":\"e2a3f2d06894894eed1ee87d9db1ace77d4d42ee6e1288a8940ad2c10333b0c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1409,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:51] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1409,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1352,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1352,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1352,\"provider\":\"google\",\"refreshToken\":\"dd4b16b00fdc1216da6b717c02338c073636e29162826b2de6db3f064fc029eb\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1352,\"provider\":\"google\",\"responseBody\":{\"error\":\"unauthorized_client\",\"error_description\":\"Unauthorized\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1352,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1296,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1296,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1296,\"provider\":\"office\",\"refreshToken\":\"011ae723c9d800c674e0b4be76f49fc046dac7d501b66c59ef0d9549cfa56ae5\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:52] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [Calendar] Processing sync {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"from\":null,\"to\":null,\"delta\":\"CIiFh8TP44kDEIiFh8TP44kDGAUgkZvkzgIokZvkzgI=\",\"last_sync\":\"2024-12-09 07:12:53\",\"dateMode\":\"daily\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"integration-app\",\"crm_owner\":1695,\"team_id\":3143} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1502,\"provider\":\"google\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1296,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 25d0b704-2b97-441f-8872-7a83cf080a00 Correlation ID: f30696fa-76fc-4fef-a2a9-ce79d87f0f0f Timestamp: 2026-04-22 12:58:53Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:53Z\\\",\\\"trace_id\\\":\\\"25d0b704-2b97-441f-8872-7a83cf080a00\\\",\\\"correlation_id\\\":\\\"f30696fa-76fc-4fef-a2a9-ce79d87f0f0f\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1296,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":391,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":391,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:53] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":391,\"provider\":\"office\",\"refreshToken\":\"00045eebae0f39b34887c6d53f92ae78064f7145e1f4b67754aebd03cfb2d881\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:54] local.INFO: [Google Calendar] Failed to watch channel for calendar {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:54] local.WARNING: [Calendar] Sync failed {\"calendarId\":\"a33076c1-8d97-431a-99f0-85c9524e118b\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"9667b419-f079-41ce-8eac-f68d9dd81b17\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":391,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: 1d6725bd-cc35-45f1-a718-542f9f545400 Correlation ID: 1a55b894-6177-4e3b-9ae7-9dd3e0793aa6 Timestamp: 2026-04-22 12:58:55Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:55Z\\\",\\\"trace_id\\\":\\\"1d6725bd-cc35-45f1-a718-542f9f545400\\\",\\\"correlation_id\\\":\\\"1a55b894-6177-4e3b-9ae7-9dd3e0793aa6\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":391,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1271,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1271,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:55] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1271,\"provider\":\"office\",\"refreshToken\":\"118cde2c06993147b07ccaec4cbcd5026a819dea6c71081166a492933e392afb\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1271,\"provider\":\"office\",\"responseBody\":\"{\\\"error\\\":\\\"invalid_client\\\",\\\"error_description\\\":\\\"AADSTS7000215: Invalid client secret provided. Ensure the secret being sent in the request is the client secret value, not the client secret ID, for a secret added to app 'bbcbb2ef-6200-4fae-82bd-d81f5dd738da'. Trace ID: e5bd1cd1-2188-4fe8-b57a-342c5ea25d00 Correlation ID: efdae7db-7216-411d-b08e-ed0a3798cced Timestamp: 2026-04-22 12:58:56Z\\\",\\\"error_codes\\\":[7000215],\\\"timestamp\\\":\\\"2026-04-22 12:58:56Z\\\",\\\"trace_id\\\":\\\"e5bd1cd1-2188-4fe8-b57a-342c5ea25d00\\\",\\\"correlation_id\\\":\\\"efdae7db-7216-411d-b08e-ed0a3798cced\\\",\\\"error_uri\\\":\\\"https://login.microsoftonline.com/error?code=7000215\\\"}\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1271,\"provider\":\"office\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1351,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1351,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1351,\"provider\":\"google\",\"refreshToken\":\"4271d15b9e60a606439caddc68337f783e472c85b03dacff14d1b6dfded9051c\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1351,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Token has been expired or revoked.\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1351,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1366,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1366,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:56] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1366,\"provider\":\"google\",\"refreshToken\":\"ae21385059b2eebfd43f68aecd56eccd702a1aabb6598f1f7ab594ed8af491b4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1366,\"provider\":\"google\",\"responseBody\":{\"error\":\"invalid_grant\",\"error_description\":\"Bad Request\"}} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.ERROR: [SocialAccountService] Failed to refresh token {\"socialAccountId\":1366,\"provider\":\"google\",\"reason\":\"Flow refresh required.\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Calendar sync job dispatched {\"calendar_id\":378} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Calendar sync job dispatched {\"calendar_id\":504} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.NOTICE: Calendar sync end {\"retrieved_calendars\":31,\"processed_calendars\":3} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"calendar:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"857c211b-0a50-4f93-81f4-7c57112dbf9f\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:58] local.INFO: [Calendar] Processing sync {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"from\":null,\"to\":null,\"delta\":\"CJ_x49O3jpIDEJ_x49O3jpIDGAUgw67KlwMow67KlwM=\",\"last_sync\":\"2026-01-19 07:48:40\",\"dateMode\":\"daily\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.WARNING: [Pipedrive] Account not connected for user {\"userId\":\"e6538737-e7b4-455f-a37a-3e79b665a220\",\"account\":{\"Jiminny\\\\Models\\\\SocialAccount\":{\"id\":1116,\"sociable_id\":241,\"provider_user_id\":\"19555731\",\"expires\":1775683749,\"refresh_token_expires\":null,\"provider\":\"pipedrive\",\"state\":\"full-refresh\",\"auth_scope\":\"base,deals:full,activities:full,contacts:full,search:read\",\"retry_after\":null,\"created_at\":\"2023-09-08 09:44:29\",\"updated_at\":\"2026-04-08 22:58:34\"}}} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"pipedrive\",\"crm_owner\":241,\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"pipedrive\",\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"pipedrive\",\"team_id\":19} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.WARNING: [Calendar] CRM disconnected for user so events will not be matched {\"provider\":\"pipedrive\",\"user_id\":241,\"message\":\"Your Pipedrive account has become disconnected. Please login to Jiminny to reconnect.\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1115,\"provider\":\"google\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:58:59] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [Google Calendar] Failed to watch channel for calendar {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.WARNING: [Calendar] Sync failed {\"calendarId\":\"2676cb6d-f86c-427e-bf78-591e388e3c1e\",\"code\":400,\"reason\":\"{\n \\\"error\\\": {\n \\\"errors\\\": [\n {\n \\\"domain\\\": \\\"global\\\",\n \\\"reason\\\": \\\"push.webhookUrlNotHttps\\\",\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n ],\n \\\"code\\\": 400,\n \\\"message\\\": \\\"WebHook callback must be HTTPS: /webhook/calendar/google?resourceType=event\\\"\n }\n}\"} {\"correlation_id\":\"8cdf4acc-5e77-4451-bdbb-53316d42cf29\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1421,\"provider\":\"office\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [Calendar] Processing sync {\"calendarId\":\"9e8b1a2c-1a8f-42bd-b161-810fc0baf540\",\"from\":null,\"to\":null,\"delta\":\"R0usmcdvmMuZCBYV0hguCBHuivUdVOntZSerMNlGAd8Mh-QEjxdgu3t-Je-miimywuM6XueDQEeG_EAoMPB4JUcglRpRd2uU__kwKHxIGGLdwQZrESaJYf_mWKpVrB0AIgfFtZqdunGkG4ABZ4D8WJPwigphxHDeViHwNGs07qPw9B0ZpI_rH21q_cBjKmDZgllRuDHWKGxpeWeqs7qjVA.gepHPUlLdflV-0FfF7i_w4E9eenkrwWmyW1hNkLzXoQ\",\"last_sync\":\"2026-04-22 12:28:39\",\"dateMode\":\"daily\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:00] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1499,\"provider\":\"hubspot\",\"refreshToken\":\"96f94c623a404e02ebdbf07f1b75707bb6cdbf848cbf45d418baf608c41a8d86\",\"state\":\"connected\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountObserver] Access token was modified, encrypting {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [SocialAccountService] Token refreshed {\"socialAccountId\":1499,\"provider\":\"hubspot\",\"state\":\"connected\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:01] local.INFO: [MS Office Calendar] Skipping delta sync for daily mode {\"calendarId\":\"9e8b1a2c-1a8f-42bd-b161-810fc0baf540\"} {\"correlation_id\":\"8eda2477-160e-4f2f-b43f-e5db2f4ba3b3\",\"trace_id\":\"a7cbf846-5571-47e0-92ba-cec797781f1d\"}\n[2026-04-22 12:59:31] local.ERROR: Target class [Jiminny\\Repositories\\AjReportsRepository] does not exist. {\"exception\":\"[object] (Illuminate\\\\Contracts\\\\Container\\\\BindingResolutionException(code: 0): Target class [Jiminny\\\\Repositories\\\\AjReportsRepository] does not exist. at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1124)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#29 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#30 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#31 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#39 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#40 {main}\n\n[previous exception] [object] (ReflectionException(code: -1): Class \\\"Jiminny\\\\Repositories\\\\AjReportsRepository\\\" does not exist at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1122)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1122): ReflectionClass->__construct('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#29 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#30 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#31 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#39 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#40 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#41 {main}\n\"} {\"correlation_id\":\"2498dcbb-629d-44de-af9f-4c587a6c1568\",\"trace_id\":\"f91124c4-944c-4407-a18c-bc42bd477954\"}\n[2026-04-22 12:59:36] local.ERROR: Target class [Jiminny\\Repositories\\AjReportsRepository] does not exist. {\"exception\":\"[object] (Illuminate\\\\Contracts\\\\Container\\\\BindingResolutionException(code: 0): Target class [Jiminny\\\\Repositories\\\\AjReportsRepository] does not exist. at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1124)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#29 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#30 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#31 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#39 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#40 {main}\n\n[previous exception] [object] (ReflectionException(code: -1): Class \\\"Jiminny\\\\Repositories\\\\AjReportsRepository\\\" does not exist at /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php:1122)\n[stacktrace]\n#0 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1122): ReflectionClass->__construct('Jiminny\\\\\\\\Reposit...')\n#1 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Reposit...')\n#2 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Reposit...', Array, true)\n#3 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Reposit...', Array)\n#4 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Reposit...', Array)\n#5 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1336): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Reposit...')\n#6 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1237): Illuminate\\\\Container\\\\Container->resolveClass(Object(ReflectionParameter))\n#7 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(1162): Illuminate\\\\Container\\\\Container->resolveDependencies(Array)\n#8 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(933): Illuminate\\\\Container\\\\Container->build('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#9 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1078): Illuminate\\\\Container\\\\Container->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array, true)\n#10 /home/jiminny/vendor/laravel/framework/src/Illuminate/Container/Container.php(864): Illuminate\\\\Foundation\\\\Application->resolve('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#11 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1058): Illuminate\\\\Container\\\\Container->make('Jiminny\\\\\\\\Http\\\\\\\\Co...', Array)\n#12 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(286): Illuminate\\\\Foundation\\\\Application->make('Jiminny\\\\\\\\Http\\\\\\\\Co...')\n#13 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1133): Illuminate\\\\Routing\\\\Route->getController()\n#14 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Route.php(1062): Illuminate\\\\Routing\\\\Route->controllerMiddleware()\n#15 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(834): Illuminate\\\\Routing\\\\Route->gatherMiddleware()\n#16 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(816): Illuminate\\\\Routing\\\\Router->gatherRouteMiddleware(Object(Illuminate\\\\Routing\\\\Route))\n#17 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\n#18 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(764): Illuminate\\\\Routing\\\\Router->runRoute(Object(Illuminate\\\\Http\\\\Request), Object(Illuminate\\\\Routing\\\\Route))\n#19 /home/jiminny/vendor/laravel/framework/src/Illuminate/Routing/Router.php(753): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\n#20 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\n#21 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#22 /home/jiminny/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#23 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Barryvdh\\\\Debugbar\\\\Middleware\\\\InjectDebugbar->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#24 /home/jiminny/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(74): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#25 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Http\\\\Middleware\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#26 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#27 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TransformsRequest->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#28 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\TrimStrings->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#29 /home/jiminny/vendor/bepsvpt/secure-headers/src/SecureHeadersMiddleware.php(18): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#30 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Bepsvpt\\\\SecureHeaders\\\\SecureHeadersMiddleware->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#31 /home/jiminny/app/Http/Middleware/SentryContext.php(60): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#32 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Jiminny\\\\Http\\\\Middleware\\\\SentryContext->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#33 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#34 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#35 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php(22): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#36 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(219): Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\InvokeDeferredCallbacks->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\n#37 /home/jiminny/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(137): Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\n#38 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\n#39 /home/jiminny/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\n#40 /home/jiminny/public/index.php(51): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\n#41 {main}\n\"} {\"correlation_id\":\"f3b33f2f-0c3c-41b1-97a2-9b4009a9e997\",\"trace_id\":\"45643213-3dc6-40d3-a943-229aba6d6d97\"}\n[2026-04-22 13:00:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:18] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2df26b5c-3094-4cc0-bf11-34efccf21d65\",\"trace_id\":\"1653f42b-8920-40eb-8afc-ad806375db7e\"}\n[2026-04-22 13:00:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"26895f9c-162b-43cc-9529-2e05dfe3895d\",\"trace_id\":\"a39dae78-bfac-4f7e-9b1c-d8a28e4bd066\"}\n[2026-04-22 13:00:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"26895f9c-162b-43cc-9529-2e05dfe3895d\",\"trace_id\":\"a39dae78-bfac-4f7e-9b1c-d8a28e4bd066\"}\n[2026-04-22 13:00:33] local.NOTICE: Monitoring start {\"correlation_id\":\"02893a2a-7e2c-4e30-af31-4626e1dcc56f\",\"trace_id\":\"93f0e225-8602-42c2-8a61-f1c716975392\"}\n[2026-04-22 13:00:33] local.NOTICE: Monitoring end {\"correlation_id\":\"02893a2a-7e2c-4e30-af31-4626e1dcc56f\",\"trace_id\":\"93f0e225-8602-42c2-8a61-f1c716975392\"}\n[2026-04-22 13:00:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b27edd55-2a89-4b8a-a514-1267c1e8c1d9\",\"trace_id\":\"210c11d9-12db-41d6-8f7e-b45a0f82eca7\"}\n[2026-04-22 13:00:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b27edd55-2a89-4b8a-a514-1267c1e8c1d9\",\"trace_id\":\"210c11d9-12db-41d6-8f7e-b45a0f82eca7\"}\n[2026-04-22 13:00:49] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:49] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"219c26d0-9d2f-4bf4-8fcc-d32599a7a2b2\",\"trace_id\":\"ca937b87-189d-4b79-b7b2-64d18120d862\"}\n[2026-04-22 13:00:55] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 12:58:00, 2026-04-22 13:00:00] {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 12:58:00, 2026-04-22 13:00:00] {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:00:55] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"972f7222-5e9d-48fd-b3e2-b49d00e07857\",\"trace_id\":\"4bb0a08d-6963-4200-bcc6-ffedaf107b1d\"}\n[2026-04-22 13:01:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"eca7f0a3-5c67-4573-8143-8b487913769a\",\"trace_id\":\"b9e515b3-499a-4793-a5fd-f0e8315e6493\"}\n[2026-04-22 13:01:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"eca7f0a3-5c67-4573-8143-8b487913769a\",\"trace_id\":\"b9e515b3-499a-4793-a5fd-f0e8315e6493\"}\n[2026-04-22 13:01:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ff9d3e97-b2de-47f6-89d8-ac048d7683b4\",\"trace_id\":\"2688a8cd-4ec9-4fdf-916a-f3bebdcbd1bf\"}\n[2026-04-22 13:01:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ff9d3e97-b2de-47f6-89d8-ac048d7683b4\",\"trace_id\":\"2688a8cd-4ec9-4fdf-916a-f3bebdcbd1bf\"}\n[2026-04-22 13:01:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:19] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"45d1b8a0-a4fe-4ed6-b472-e4b928fff74e\",\"trace_id\":\"3246f302-4a67-47f7-b6d7-c8012ab88c39\"}\n[2026-04-22 13:01:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 12:51:00, 2026-04-22 12:56:00] {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 12:51:00, 2026-04-22 12:56:00] {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:26] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"36b4a919-4a6f-4179-aa7d-ed5cebb48dd1\",\"trace_id\":\"0754eac0-81b7-402a-91f3-fde3df4d7dd9\"}\n[2026-04-22 13:01:35] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"12:56\",\"to\":\"13:01\"} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"02:51\",\"to\":\"02:56\"} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:35] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"05dd1338-40bc-4d94-a24d-eede4fc80fb0\",\"trace_id\":\"7712c86f-1825-4726-bae7-3f892f030097\"}\n[2026-04-22 13:01:43] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:43] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:44] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:45] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"738a1930-8f5a-4cd1-863b-ede1ac7db018\",\"trace_id\":\"3c86bab7-75b2-4d34-a0cd-18472d3affed\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f2dd9f6e-8bac-47e4-8eeb-5e9fe7a12e1b\",\"trace_id\":\"4769977c-9ea4-4420-9843-a189f74117f3\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d0c89873-e405-4a53-88d4-272acfe4ce55\",\"trace_id\":\"db523f79-d31f-4f05-8d92-7167282a3ca2\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d0c89873-e405-4a53-88d4-272acfe4ce55\",\"trace_id\":\"db523f79-d31f-4f05-8d92-7167282a3ca2\"}\n[2026-04-22 13:01:57] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f2dd9f6e-8bac-47e4-8eeb-5e9fe7a12e1b\",\"trace_id\":\"4769977c-9ea4-4420-9843-a189f74117f3\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:03:57.666831Z\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:57] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:01:58] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:03] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1848ed6f-18ba-4f26-821b-c6a0e52a8ef3\",\"trace_id\":\"16848494-0155-48c2-b153-0d83a8a2130b\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:08] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1848ed6f-18ba-4f26-821b-c6a0e52a8ef3\",\"trace_id\":\"16848494-0155-48c2-b153-0d83a8a2130b\"}\n[2026-04-22 13:02:08] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811301,\"provider\":\"twilio-flex\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811302,\"provider\":\"xant\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811303,\"provider\":\"apollo\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811304,\"provider\":\"groove\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811305,\"provider\":\"twilio-video\",\"team\":\"jiminny\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Dispatching activity sync job {\"import_id\":811306,\"provider\":\"hubspot\",\"team\":\"hubspot\"} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"6e03ed91-341a-46c5-8345-332ddcf99cc2\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.WARNING: [Salesforce] Account not connected for user {\"userId\":\"cdf8b554-d951-4758-bc2b-c1b85d1cd0b9\",\"account\":null} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"salesforce\",\"crm_owner\":3,\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [CrmOwnerResolver] TeamMember found with active crm connection {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1194,\"provider\":\"twilio-flex\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1194,\"provider\":\"twilio-flex\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.INFO: [SyncActivity] Start {\"import_id\":811301,\"provider\":\"twilio-flex\",\"provider_id\":317,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:25] local.NOTICE: [TwilioFlex] Calls import start {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.ALERT: [SyncActivity] Failed {\"import_id\":811301,\"provider\":\"twilio-flex\",\"provider_id\":317,\"team\":\"jiminny\",\"team_id\":1,\"reason\":\"[HTTP 401] Unable to fetch page: Authenticate\",\"file\":\"/home/jiminny/vendor/twilio/sdk/src/Twilio/Page.php\",\"line\":60} {\"correlation_id\":\"e876a544-15a3-4f31-9208-5c41b0271258\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [SyncActivity] Start {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT Playbooks_Call_Date__c,Playbooks_Call_Recording__c,CreatedDate,TaskSubtype,CallType,CallDurationInSeconds,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:26] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+Playbooks_Call_Date__c%2CPlaybooks_Call_Recording__c%2CCreatedDate%2CTaskSubtype%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Xant (InsideSales)] No calls found. {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] End {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] Memory usage {\"import_id\":811302,\"provider\":\"xant\",\"provider_id\":161,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31469584,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"b7542ee6-abee-46ad-9eae-3da18a8adeaf\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [SyncActivity] Start {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT AccountId,CreatedDate,TaskSubtype,CallType,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:27] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+AccountId%2CCreatedDate%2CTaskSubtype%2CCallType%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Apollo] No calls found. {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] End {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] Memory usage {\"import_id\":811303,\"provider\":\"apollo\",\"provider_id\":441,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31633656,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"20955a8c-f884-42b6-8718-d3a050e275ad\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [SyncActivity] Start {\"import_id\":811304,\"provider\":\"groove\",\"provider_id\":228,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Salesforce] Performing query {\"query\":\"\n SELECT call_recording_url__c,TaskSubtype,CreatedDate,CallType,CallDurationInSeconds,Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type\n FROM Task\n WHERE IsDeleted = false\n AND LastModifiedDate >= :from\n AND LastModifiedDate <= :to\n ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:28] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+call_recording_url__c%2CTaskSubtype%2CCreatedDate%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.ERROR: [Salesforce] Request exception [400] \nSELECT call_recording_url__c,TaskSubtype\n ^\nERROR at Row:1:Column:8\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. {\"url\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=%0A++++++++++++SELECT+call_recording_url__c%2CTaskSubtype%2CCreatedDate%2CCallType%2CCallDurationInSeconds%2CId%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%0A++++++++++++++FROM+Task%0A+++++++++++++WHERE+IsDeleted+%3D+false%0A+++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A+++++++++++++++AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z%0A++++++++++ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000\",\"data\":{\"headers\":{\"Authorization\":\"Bearer 00D2g0000008hH4!AQEAQHyufOPbAPKwYOvd5c39ZYs6JEVT_IUvgbdDZ5iMwNtUGuDAwf3epMoUD5vLlu.9AOf.7K4B3qPz2VjGLuWaHwdNRHJD\"}},\"response\":{\"GuzzleHttp\\\\Psr7\\\\Stream\":\"[{\\\"message\\\":\\\"\\\\nSELECT call_recording_url__c,TaskSubtype\\\\n ^\\\\nERROR at Row:1:Column:8\\\\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.\\\",\\\"errorCode\\\":\\\"INVALID_FIELD\\\"}]\"},\"fields\":[]} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.ALERT: [SyncActivity] Failed {\"import_id\":811304,\"provider\":\"groove\",\"provider_id\":228,\"team\":\"jiminny\",\"team_id\":1,\"reason\":\"\nSELECT call_recording_url__c,TaskSubtype\n ^\nERROR at Row:1:Column:8\nNo such column 'call_recording_url__c' on entity 'Task'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.\",\"file\":\"/home/jiminny/app/Services/Crm/Salesforce/Client.php\",\"line\":564} {\"correlation_id\":\"4e0f24d9-8fa0-490a-b051-bb32edddab3c\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"salesforce\",\"crm_owner\":143,\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1500,\"provider\":\"salesforce\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] Start {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Salesforce] Performing query {\"query\":\"SELECT Id,OwnerId,WhoId,WhatId,Priority,ActivityDate,Subject,Description,Status,Type,twilio_call_sid__c,Lead_UUID__c,Opportunity__c\n FROM Task\n WHERE Type = 'Video'\n AND isClosed = true\n AND IsDeleted = false\n AND LastModifiedDate >= :from\n AND twilio_call_sid__c != NULL AND LastModifiedDate <= :to ORDER BY LastModifiedDate ASC\n LIMIT :limit\",\"params\":{\"from\":\"2026-04-22T12:44:00Z\",\"to\":\"2026-04-22T13:00:00Z\",\"ownerId\":null,\"subType\":null,\"limit\":5000}} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Salesforce] Sending request {\"endpoint\":\"https://jiminny--stagingenv.sandbox.my.salesforce.com/services/data/v50.0/query/?q=SELECT+Id%2COwnerId%2CWhoId%2CWhatId%2CPriority%2CActivityDate%2CSubject%2CDescription%2CStatus%2CType%2Ctwilio_call_sid__c%2CLead_UUID__c%2COpportunity__c%0A++++++++++++++FROM+Task%0A++++++++++++WHERE+Type+%3D+%27Video%27%0A++++++++++++++AND+isClosed+%3D+true%0A++++++++++++++AND+IsDeleted+%3D+false%0A++++++++++++++AND+LastModifiedDate+%3E%3D+2026-04-22T12%3A44%3A00Z%0A++++++++++++++AND+twilio_call_sid__c+%21%3D+NULL+AND+LastModifiedDate+%3C%3D+2026-04-22T13%3A00%3A00Z+ORDER+BY+LastModifiedDate+ASC%0A+++++++++++++LIMIT+5000 GET\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [Twilio Video] No calls found. {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] End {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:29] local.INFO: [SyncActivity] Memory usage {\"import_id\":811305,\"provider\":\"twilio-video\",\"provider_id\":243,\"team\":\"jiminny\",\"team_id\":1,\"memory_usage\":31948304,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"f6f3bb41-cccc-4b95-a058-5063e0865556\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Token needs refreshing {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":408,\"provider\":\"hubspot\",\"refreshToken\":\"de4e47eb985578f4218833e763e31059e88b562e87e10749b3389be2328f0aa7\",\"state\":\"connected\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountObserver] Saving model {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:30] local.INFO: [SocialAccountObserver] Access token was modified, encrypting {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SocialAccountService] Token refreshed {\"socialAccountId\":408,\"provider\":\"hubspot\",\"state\":\"connected\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] Start {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [HubSpot] Search calls for period {\"from\":\"2026-04-22 12:44:00\",\"to\":\"2026-04-22 13:00:00\"} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] End {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:31] local.INFO: [SyncActivity] Memory usage {\"import_id\":811306,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2,\"memory_usage\":32384296,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"8ad9392c-6ba5-4cff-ae45-8c926f92ace5\",\"trace_id\":\"37672b04-c889-4564-bbb4-7ba05a349734\"}\n[2026-04-22 13:02:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:fail-stalled\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"4e2a76a1-e4d2-418e-a50a-25e941201f38\",\"trace_id\":\"c31965c9-daaa-4a9e-a211-0cd89722c40f\"}\n[2026-04-22 13:02:33] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:fail-stalled\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"4e2a76a1-e4d2-418e-a50a-25e941201f38\",\"trace_id\":\"c31965c9-daaa-4a9e-a211-0cd89722c40f\"}\n[2026-04-22 13:02:40] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-stuck\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"48eff6ba-ca64-4105-a67c-f1b0b07bdf31\",\"trace_id\":\"e0244903-31d1-41cd-8aed-faf35bf63dd6\"}\n[2026-04-22 13:02:40] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-stuck\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"48eff6ba-ca64-4105-a67c-f1b0b07bdf31\",\"trace_id\":\"e0244903-31d1-41cd-8aed-faf35bf63dd6\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":57,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":289.0,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:02:54] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"3a2d6014-0dc0-4457-8765-c4df9a137d68\",\"trace_id\":\"35c42a87-11bb-425d-aadb-10ae151b0a10\"}\n[2026-04-22 13:03:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"dde0795d-49fc-40be-8036-47bf75d570ee\",\"trace_id\":\"757e2167-b7e4-4179-bb5d-8fd63c06b796\"}\n[2026-04-22 13:03:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"dde0795d-49fc-40be-8036-47bf75d570ee\",\"trace_id\":\"757e2167-b7e4-4179-bb5d-8fd63c06b796\"}\n[2026-04-22 13:03:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"97203323-4b81-4806-a2a6-103ec5d8dadf\",\"trace_id\":\"92584aa6-7163-436f-83c3-2bb006ed5c6a\"}\n[2026-04-22 13:03:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"97203323-4b81-4806-a2a6-103ec5d8dadf\",\"trace_id\":\"92584aa6-7163-436f-83c3-2bb006ed5c6a\"}\n[2026-04-22 13:03:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e42588a2-0a81-4cf7-8794-9fff56c32389\",\"trace_id\":\"455577ea-6a58-4e26-b108-f195b774425f\"}\n[2026-04-22 13:03:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e42588a2-0a81-4cf7-8794-9fff56c32389\",\"trace_id\":\"455577ea-6a58-4e26-b108-f195b774425f\"}\n[2026-04-22 13:03:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"211d6a4e-8495-4c40-8b29-b2b262d2876b\",\"trace_id\":\"37a727c7-0bc6-4b1d-892e-88bb7e97d27f\"}\n[2026-04-22 13:03:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"211d6a4e-8495-4c40-8b29-b2b262d2876b\",\"trace_id\":\"37a727c7-0bc6-4b1d-892e-88bb7e97d27f\"}\n[2026-04-22 13:03:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"83fa21ef-4709-4513-8c54-71d3de422571\",\"trace_id\":\"3a5511fd-a984-46ee-9b35-ebda4cc8026e\"}\n[2026-04-22 13:03:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"83fa21ef-4709-4513-8c54-71d3de422571\",\"trace_id\":\"3a5511fd-a984-46ee-9b35-ebda4cc8026e\"}\n[2026-04-22 13:03:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:39] local.INFO: Dispatching activity sync job {\"import_id\":811307,\"provider\":\"hubspot\",\"team\":\"hubspot\"} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9dacc9b8-c7ea-4626-b1b1-adae45f58403\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":89,\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":408,\"provider\":\"hubspot\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] Start {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [HubSpot] Search calls for period {\"from\":\"2026-04-22 12:00:00\",\"to\":\"2026-04-22 13:00:00\"} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] End {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:42] local.INFO: [SyncActivity] Memory usage {\"import_id\":811307,\"provider\":\"hubspot\",\"provider_id\":31,\"team\":\"hubspot\",\"team_id\":2,\"memory_usage\":32544256,\"memory_real_usage\":67108864,\"pid\":39383} {\"correlation_id\":\"b9c97a6b-48ba-4ca3-87f2-313b9af79eec\",\"trace_id\":\"9cad55ec-94f8-480f-8a0c-71c819b0fac8\"}\n[2026-04-22 13:03:48] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"43c720b0-251a-4551-888c-1d2ab14e0052\",\"trace_id\":\"455b5c19-0fc5-44ce-bfc9-bc2b22c3cecf\"}\n[2026-04-22 13:03:48] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"43c720b0-251a-4551-888c-1d2ab14e0052\",\"trace_id\":\"455b5c19-0fc5-44ce-bfc9-bc2b22c3cecf\"}\n[2026-04-22 13:03:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"nudges:send\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b0f1e481-6106-4dc8-9eb2-ef9275b43221\",\"trace_id\":\"c445805a-2dc8-4b56-b36a-619e8df9ea0d\"}\n[2026-04-22 13:03:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"nudges:send\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b0f1e481-6106-4dc8-9eb2-ef9275b43221\",\"trace_id\":\"c445805a-2dc8-4b56-b36a-619e8df9ea0d\"}\n[2026-04-22 13:04:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:playlists:normalize-sort\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: [Jiminny\\Component\\Playlist\\Command\\NormalizeSortCommand::handle] starting. {\"playlists\":[]} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: [Jiminny\\Component\\Playlist\\Command\\NormalizeSortCommand::handle] finished. {\"normalizedPlaylists\":[],\"deletedPlaylists\":[]} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:04:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:playlists:normalize-sort\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"5b2e9869-c9e7-476c-9c11-7d6103ad7ad2\",\"trace_id\":\"6adf8fcf-1ed5-41f6-8735-69b2aad7284d\"}\n[2026-04-22 13:05:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:05] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"acfb5a5c-6e3c-49ca-8648-8dc4016b5874\",\"trace_id\":\"f1b7e162-09d3-40e0-b7ea-9ac5901df101\"}\n[2026-04-22 13:05:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"80d9cf23-d699-4311-b055-fde647069da5\",\"trace_id\":\"1e1c5e76-8d24-4d40-a950-5e57196b30b9\"}\n[2026-04-22 13:05:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"80d9cf23-d699-4311-b055-fde647069da5\",\"trace_id\":\"1e1c5e76-8d24-4d40-a950-5e57196b30b9\"}\n[2026-04-22 13:05:08] local.NOTICE: Monitoring start {\"correlation_id\":\"f88ba579-1250-4736-be77-b2626f3dd5e8\",\"trace_id\":\"d559bcb8-5b20-462b-95d3-a386d0b6cddf\"}\n[2026-04-22 13:05:08] local.NOTICE: Monitoring end {\"correlation_id\":\"f88ba579-1250-4736-be77-b2626f3dd5e8\",\"trace_id\":\"d559bcb8-5b20-462b-95d3-a386d0b6cddf\"}\n[2026-04-22 13:05:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"51c4efa8-98da-4b2c-9ce6-8456ec73ed6f\",\"trace_id\":\"2d90942a-a8d0-49ae-a951-6e478801b244\"}\n[2026-04-22 13:05:10] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"51c4efa8-98da-4b2c-9ce6-8456ec73ed6f\",\"trace_id\":\"2d90942a-a8d0-49ae-a951-6e478801b244\"}\n[2026-04-22 13:05:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"377d49fb-8e0b-45ec-bae8-2a7454fcc59e\",\"trace_id\":\"19f23657-5d31-4a99-bd55-7441073fcf5e\"}\n[2026-04-22 13:05:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b698a551-6cef-4e0f-a6ca-43b321d118a3\",\"trace_id\":\"43da569b-05dd-4495-8feb-3677e569ccbe\"}\n[2026-04-22 13:05:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b698a551-6cef-4e0f-a6ca-43b321d118a3\",\"trace_id\":\"43da569b-05dd-4495-8feb-3677e569ccbe\"}\n[2026-04-22 13:05:13] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a4b0eaaf-05bd-4b13-909d-847c02155c13\",\"trace_id\":\"439cc764-b15d-4bdb-bac5-906520ff723a\"}\n[2026-04-22 13:05:14] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a4b0eaaf-05bd-4b13-909d-847c02155c13\",\"trace_id\":\"439cc764-b15d-4bdb-bac5-906520ff723a\"}\n[2026-04-22 13:05:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:16] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e29583c3-0a8d-4c5f-a3d2-d7daa1cc7fb9\",\"trace_id\":\"3e1c7057-42fd-4565-be35-7b9053100fe3\"}\n[2026-04-22 13:05:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 12:55:00, 2026-04-22 13:00:00] {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 12:55:00, 2026-04-22 13:00:00] {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"887b0463-0ed8-420c-9102-b45e92428e71\",\"trace_id\":\"8a469e8c-6fe0-4d97-9df7-4b314d12700e\"}\n[2026-04-22 13:05:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"13:00\",\"to\":\"13:05\"} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"02:55\",\"to\":\"03:00\"} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a67898ef-d899-4fcc-a292-1fc8d1fcac5a\",\"trace_id\":\"123a8f78-438e-434c-b5a0-ba85a32cf39b\"}\n[2026-04-22 13:05:38] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:38] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:39] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:40] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:40] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"cd2a60e9-749a-42bf-91c5-3954fe2444e6\",\"trace_id\":\"9e39f818-fe08-439d-9bc2-4d0958be3f41\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"0855c74a-4c1d-4500-a8a6-9aea42e1b4c3\",\"trace_id\":\"3f0e341d-9b00-427d-9d66-a90e03d39fb4\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"0dcaff9b-c757-4b47-9d31-d585ff98f093\",\"trace_id\":\"eff09743-6f3b-420a-b0ca-bce23ecc2896\"}\n[2026-04-22 13:05:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"0855c74a-4c1d-4500-a8a6-9aea42e1b4c3\",\"trace_id\":\"3f0e341d-9b00-427d-9d66-a90e03d39fb4\"}\n[2026-04-22 13:05:50] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:07:51.069944Z\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"0dcaff9b-c757-4b47-9d31-d585ff98f093\",\"trace_id\":\"eff09743-6f3b-420a-b0ca-bce23ecc2896\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:51] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:05:56] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:01] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:16] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:16] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"adde6c30-5460-47c6-bcc4-3fef389783c3\",\"trace_id\":\"c2b9bf83-781a-4287-bf4a-e426539628d4\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:17] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1b9886f8-99e5-401c-a068-e9b09bd1cac1\",\"trace_id\":\"03b61d1f-70be-4586-a3b1-7913f59eb5a4\"}\n[2026-04-22 13:06:24] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1b9886f8-99e5-401c-a068-e9b09bd1cac1\",\"trace_id\":\"03b61d1f-70be-4586-a3b1-7913f59eb5a4\"}\n[2026-04-22 13:06:30] local.NOTICE: Monitoring start {\"correlation_id\":\"57876f15-2702-4e20-9f3d-c4cfdc870b28\",\"trace_id\":\"c9b182fa-de3a-4ace-a7cf-730cb8c2c31e\"}\n[2026-04-22 13:06:30] local.NOTICE: Monitoring end {\"correlation_id\":\"57876f15-2702-4e20-9f3d-c4cfdc870b28\",\"trace_id\":\"c9b182fa-de3a-4ace-a7cf-730cb8c2c31e\"}\n[2026-04-22 13:06:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a6febc04-e974-4bfe-a983-1d7cf42f40fe\",\"trace_id\":\"d8dc4a27-3357-4c8d-8899-7b3cf288a68c\"}\n[2026-04-22 13:06:39] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a6febc04-e974-4bfe-a983-1d7cf42f40fe\",\"trace_id\":\"d8dc4a27-3357-4c8d-8899-7b3cf288a68c\"}\n[2026-04-22 13:06:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"2690a4ba-7609-4cf1-b38b-37d645573253\",\"trace_id\":\"32ce85ff-4c66-4c9e-94f2-db790054902d\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":56,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":210.7,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:47] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"20019095-0956-4a9d-8ec5-9e71e85c51df\",\"trace_id\":\"3cb1dd3d-f612-4cbc-b157-46970e924097\"}\n[2026-04-22 13:06:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:04:00, 2026-04-22 13:06:00] {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:04:00, 2026-04-22 13:06:00] {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:06:56] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"6e08252a-460d-4bdf-853f-62b0521c83d7\",\"trace_id\":\"19706e2e-0a49-4700-aefa-94d085cc5fc3\"}\n[2026-04-22 13:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:sync-hubspot-objects\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d47e5295-cd3e-4591-824e-53d2df0c2beb\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:04] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:sync-hubspot-objects\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d47e5295-cd3e-4591-824e-53d2df0c2beb\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"abae74b8-bfa8-4383-9a7f-89f4bf2bdbb4\",\"usage\":25990080,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1499,\"provider\":\"hubspot\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {\"crm_provider\":\"hubspot\",\"crm_owner\":148,\"team_id\":2} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [HubSpot] Syncing opportunities using strategy: lastModified {\"team\":2} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [Hubspot] Pagination completed {\"team_id\":2,\"endpoint\":\"https://api.hubapi.com/crm/v3/objects/deals/search\",\"total_requests\":1,\"total_records_fetched\":0,\"total_elapsed_seconds\":0.69,\"average_seconds_per_request\":0.69} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:05] local.INFO: [HubSpot] Synced opportunities {\"team\":2,\"strategies\":\"lastModified\",\"sync_count\":0,\"total\":0,\"last_synced_id\":null,\"duration_ms\":728.16} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"abae74b8-bfa8-4383-9a7f-89f4bf2bdbb4\",\"provider\":\"hubspot\",\"status\":\"completed\",\"duration_ms\":1228.62,\"usage\":26112136,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"bdc4b9bb-ca00-4f9c-a952-aefb97bf7cca\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"b2b115eb-93ce-4d1b-929c-173757df8fba\",\"usage\":26090136,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"33e34a7a-1c02-4f04-87ac-22c3a385e6e3\",\"account\":{\"Jiminny\\\\Models\\\\SocialAccount\":{\"id\":306,\"sociable_id\":109,\"provider_user_id\":\"11348452\",\"expires\":1701077403,\"refresh_token_expires\":null,\"provider\":\"hubspot\",\"state\":\"full-refresh\",\"auth_scope\":null,\"retry_after\":null,\"created_at\":\"2020-09-01 16:59:04\",\"updated_at\":\"2023-11-27 09:30:03\"}}} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":109,\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":29} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"b2b115eb-93ce-4d1b-929c-173757df8fba\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":344.07,\"usage\":25993952,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Your HubSpot account has become disconnected. Please login to Jiminny to reconnect.\"} {\"correlation_id\":\"9c0b805f-0c86-4d6e-807c-0ae7ecbf54e2\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"b2d49a54-b645-4637-a7ae-a86cfce6e8e4\",\"usage\":26032320,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"2ac0447f-3c8c-4ce0-baeb-b63ddb76fa9b\",\"account\":null} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":130,\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":42} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"b2d49a54-b645-4637-a7ae-a86cfce6e8e4\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":40.49,\"usage\":25968512,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Social account for HubSpot cannot be found. Please login to Jiminny to connect.\"} {\"correlation_id\":\"7e7f4b34-cad8-4a9a-b4e2-2e9ee9458255\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [SyncHubspotObjects] Starting sync {\"team\":\"c6b9d6b0-b48d-4832-a68c-a57d60651888\",\"usage\":26006880,\"real_usage\":65011712,\"pid\":39378} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.WARNING: [HubSpot] Account not connected for user {\"userId\":\"71e3aac5-fb66-47c5-a236-2d051ae3e319\",\"account\":null} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] Integration owner is not connected, attempting team members {\"crm_provider\":\"hubspot\",\"crm_owner\":256,\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:06] local.INFO: [CrmOwnerResolver] No team members found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:07] local.INFO: [CrmOwnerResolver] No team member found with active crm connection {\"crm_provider\":\"hubspot\",\"team_id\":49} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:07] local.INFO: [SyncHubspotObjects] Sync finished {\"team\":\"c6b9d6b0-b48d-4832-a68c-a57d60651888\",\"provider\":\"hubspot\",\"status\":\"disconnected\",\"duration_ms\":68.83,\"usage\":25962344,\"real_usage\":65011712,\"pid\":39378,\"reason\":\"Social account for HubSpot cannot be found. Please login to Jiminny to connect.\"} {\"correlation_id\":\"d08b5c60-4bbd-40c4-af19-9a916690c0ad\",\"trace_id\":\"7fc8625e-a1d1-465e-a726-76fc738074d7\"}\n[2026-04-22 13:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"93514604-b859-4696-8477-70fe4ff430e3\",\"trace_id\":\"b170a77b-f919-4bdd-a50a-8550322f145b\"}\n[2026-04-22 13:07:12] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:notify-not-logged\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"93514604-b859-4696-8477-70fe4ff430e3\",\"trace_id\":\"b170a77b-f919-4bdd-a50a-8550322f145b\"}\n[2026-04-22 13:07:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: [EmailSchedule] STARTING Inbox Sync {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: [EmailSchedule] FINISHED Inbox Sync {\"host\":\"docker_lamp_1\",\"events\":1} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"38352903-53f9-4a0d-8500-78621d4d6abd\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Sync Mailbox] Sync start {\"inbox_id\":59} {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Inbox service] Skipping METADATA SYNC for inbox 59 due to unauthorized access to the mailbox {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:07:31] local.INFO: [Sync Mailbox] Sync complete {\"inbox_id\":59} {\"correlation_id\":\"07e14341-b3b6-4a80-b4ff-a30222f30521\",\"trace_id\":\"9d754fc7-853b-4e0a-8487-435067f1ca46\"}\n[2026-04-22 13:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:17] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"955722a5-7547-4ecd-a25a-7e678eadd9c3\",\"trace_id\":\"36c1eeea-64f3-4c33-8551-75187842d6bf\"}\n[2026-04-22 13:08:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"1e81dfe3-4f06-4ac4-ad26-328f4a459274\",\"trace_id\":\"a9e7ca99-2eef-484e-9326-24f0e0dc87c8\"}\n[2026-04-22 13:08:25] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"1e81dfe3-4f06-4ac4-ad26-328f4a459274\",\"trace_id\":\"a9e7ca99-2eef-484e-9326-24f0e0dc87c8\"}\n[2026-04-22 13:08:34] local.NOTICE: Monitoring start {\"correlation_id\":\"57f6075b-5303-4666-8a6e-b3a52cb982d9\",\"trace_id\":\"e2f94325-354f-4875-98ff-6675361668b5\"}\n[2026-04-22 13:08:34] local.NOTICE: Monitoring end {\"correlation_id\":\"57f6075b-5303-4666-8a6e-b3a52cb982d9\",\"trace_id\":\"e2f94325-354f-4875-98ff-6675361668b5\"}\n[2026-04-22 13:08:38] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"66857633-bd66-4266-b910-5adc218e04ca\",\"trace_id\":\"3246ec2a-1e99-4e36-8a98-20f639d1e482\"}\n[2026-04-22 13:08:38] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"66857633-bd66-4266-b910-5adc218e04ca\",\"trace_id\":\"3246ec2a-1e99-4e36-8a98-20f639d1e482\"}\n[2026-04-22 13:08:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:41] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"891e6492-9571-4029-ad85-98229793cba9\",\"trace_id\":\"98fe202a-3d78-4072-8355-5d37f07232fe\"}\n[2026-04-22 13:08:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:06:00, 2026-04-22 13:08:00] {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:06:00, 2026-04-22 13:08:00] {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"71920dbd-ea79-40bf-92a6-66318c43e99b\",\"trace_id\":\"6cb425e3-9ba8-4efb-8ce1-63d10af7630d\"}\n[2026-04-22 13:08:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"5ec25648-4caf-4edb-b9b3-77be3e20f30c\",\"trace_id\":\"8d7ef3b8-99cf-4c99-93a6-29e13e05870c\"}\n[2026-04-22 13:08:46] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"5ec25648-4caf-4edb-b9b3-77be3e20f30c\",\"trace_id\":\"8d7ef3b8-99cf-4c99-93a6-29e13e05870c\"}\n[2026-04-22 13:09:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:11] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"aecc4bbf-68eb-4b29-8d43-9b0fb8cd414a\",\"trace_id\":\"ff005f7c-a688-47e1-a49d-7dd17f169d0e\"}\n[2026-04-22 13:09:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"cfb4293b-1233-4dc3-9278-65d6596dd776\",\"trace_id\":\"9b099edc-6409-4c88-b7be-bda278c03653\"}\n[2026-04-22 13:09:15] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"cfb4293b-1233-4dc3-9278-65d6596dd776\",\"trace_id\":\"9b099edc-6409-4c88-b7be-bda278c03653\"}\n[2026-04-22 13:09:18] local.NOTICE: Monitoring start {\"correlation_id\":\"bf84eee0-969c-4929-82b1-042a3e3ee9aa\",\"trace_id\":\"86a2b319-ba4c-4d27-8481-f547605d4869\"}\n[2026-04-22 13:09:18] local.NOTICE: Monitoring end {\"correlation_id\":\"bf84eee0-969c-4929-82b1-042a3e3ee9aa\",\"trace_id\":\"86a2b319-ba4c-4d27-8481-f547605d4869\"}\n[2026-04-22 13:09:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"7bc53856-0042-461a-86d2-99f1bec01c30\",\"trace_id\":\"bcd93134-5e6c-480f-a336-c04a8650b04f\"}\n[2026-04-22 13:09:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"7bc53856-0042-461a-86d2-99f1bec01c30\",\"trace_id\":\"bcd93134-5e6c-480f-a336-c04a8650b04f\"}\n[2026-04-22 13:09:27] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:27] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"51495ea1-b289-4b1e-a348-8289ad97af3b\",\"trace_id\":\"b8aab25b-3182-4115-b43e-9d8eb2024ecc\"}\n[2026-04-22 13:09:29] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [SocialAccountService] Fetching token {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [SocialAccountService] Token retrieved {\"socialAccountId\":1496,\"provider\":\"aircall\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:29] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:30] local.ERROR: [Aircall] Re-activating webhooks failed {\"team_id\":1,\"reason\":\"{\\\"message\\\":\\\"Forbidden\\\"}\"} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:aircall:check-and-renew\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"db102efd-966c-460e-9f44-35693defa2c3\",\"trace_id\":\"1034b7b5-8da3-4949-a96b-b3b4c2d8a457\"}\n[2026-04-22 13:09:33] local.INFO: [RetryFailedDownloads] Starting {\"options\":{\"from\":null,\"to\":null,\"help\":false,\"silent\":false,\"quiet\":false,\"verbose\":false,\"version\":false,\"ansi\":null,\"no-interaction\":false,\"env\":null}} {\"correlation_id\":\"9bf5c195-284c-4743-9f8e-85471ffff9d4\",\"trace_id\":\"07c25e41-cab6-4714-b5e7-63bc7268336a\"}\n[2026-04-22 13:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:23] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:23] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"f4027947-80f4-4a64-aa3f-da94b4faba3e\",\"trace_id\":\"aefb861c-4f81-4325-bf89-3c53df12ec79\"}\n[2026-04-22 13:10:30] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d37b707d-a482-413f-9ce1-53b00ea3d824\",\"trace_id\":\"ebd74efd-d278-41a5-8825-4c7132fa7ff8\"}\n[2026-04-22 13:10:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d37b707d-a482-413f-9ce1-53b00ea3d824\",\"trace_id\":\"ebd74efd-d278-41a5-8825-4c7132fa7ff8\"}\n[2026-04-22 13:10:40] local.NOTICE: Monitoring start {\"correlation_id\":\"4f57d92f-53a9-4804-bec7-172ec05d9f8b\",\"trace_id\":\"79a93f08-f137-46f9-953d-ce661080a74d\"}\n[2026-04-22 13:10:41] local.NOTICE: Monitoring end {\"correlation_id\":\"4f57d92f-53a9-4804-bec7-172ec05d9f8b\",\"trace_id\":\"79a93f08-f137-46f9-953d-ce661080a74d\"}\n[2026-04-22 13:10:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9de580f9-f066-4265-9fa0-97b8ea715fc1\",\"trace_id\":\"9f8f2c76-5ef8-45cb-8da6-5fed79febe74\"}\n[2026-04-22 13:10:50] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9de580f9-f066-4265-9fa0-97b8ea715fc1\",\"trace_id\":\"9f8f2c76-5ef8-45cb-8da6-5fed79febe74\"}\n[2026-04-22 13:10:59] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: [EmailSchedule] STARTING batch process {\"host\":\"docker_lamp_1\"} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: [EmailSchedule] FINISHED batch process {\"host\":\"docker_lamp_1\",\"processed\":0} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:10:59] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:batch:process\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"c7f4e76e-2e8d-44e0-a1c2-68fc0ec4d988\",\"trace_id\":\"0423cb1c-cf05-4646-a592-4b7d3d2f9c1c\"}\n[2026-04-22 13:11:01] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: Running conference:monitor:count command for activities in (2026-04-22 13:09:00, 2026-04-22 13:11:00] {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: [conference:monitor:count] No activities found in (2026-04-22 13:09:00, 2026-04-22 13:11:00] {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:01] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:count\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"a696ebd7-18fb-40d1-8921-51d1ffd0865c\",\"trace_id\":\"e091982f-1217-4b9d-a1b6-0786e94087e5\"}\n[2026-04-22 13:11:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"82116a10-265d-43d4-b0cb-4f0b9b3cd20b\",\"trace_id\":\"1b064487-86b2-49dd-a964-e33aa4d823a2\"}\n[2026-04-22 13:11:03] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"activity:purge-stale\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"82116a10-265d-43d4-b0cb-4f0b9b3cd20b\",\"trace_id\":\"1b064487-86b2-49dd-a964-e33aa4d823a2\"}\n[2026-04-22 13:11:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"b6adf6d5-64ea-48d9-9a97-25da71181eee\",\"trace_id\":\"61f36ae5-2999-4ce9-90ee-9c6e72a86658\"}\n[2026-04-22 13:11:05] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:text-relay:sync\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"b6adf6d5-64ea-48d9-9a97-25da71181eee\",\"trace_id\":\"61f36ae5-2999-4ce9-90ee-9c6e72a86658\"}\n[2026-04-22 13:11:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:07] local.INFO: Running pre-meeting notification command {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:07] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-notification\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"cf703be0-714a-4df4-b2b7-f8f686b7380c\",\"trace_id\":\"75ee0e6a-2ae3-4b62-b267-e06f21601064\"}\n[2026-04-22 13:11:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: Running conference:monitor:start command for activities in (2026-04-22 13:01:00, 2026-04-22 13:06:00] {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: [conference:monitor:start] No activities found in (2026-04-22 13:01:00, 2026-04-22 13:06:00] {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:09] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:start\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"9b95ad76-a0f5-4835-9ccf-74f06ad5bd22\",\"trace_id\":\"11c71a33-5d36-4de9-bd0b-f9e427565a4d\"}\n[2026-04-22 13:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesEnded {\"from\":\"13:06\",\"to\":\"13:11\"} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: conference:monitor:end:Jiminny\\Console\\Commands\\Activities\\MonitorMeetingEndCommand::logActivitiesWithUnfinishedSession {\"from\":\"03:01\",\"to\":\"03:06\"} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:11] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:monitor:end\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"fae16e07-5ac2-43dc-bbff-630d8876f452\",\"trace_id\":\"5002b261-8754-4015-931f-68f54f6349ec\"}\n[2026-04-22 13:11:13] local.NOTICE: Repairing HubSpot tokens start {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: Trying to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":59,\"provider\":\"hubspot\",\"refreshToken\":\"97b78f6e2cc49965c00c2492b602b02708b1392551e6b3f113fbaa48992af90b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.ERROR: Failed to refresh HubSpot token {\"account_id\":59,\"updated_at\":\"2025-10-03 09:32:05\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: Trying to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:13] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":306,\"provider\":\"hubspot\",\"refreshToken\":\"6fa6aa8cc641d131231acc3470f5c03cb3b07b2e580fb18f8acb3b1dbb72549b\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.ERROR: Failed to refresh HubSpot token {\"account_id\":306,\"updated_at\":\"2023-11-27 09:30:03\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: Trying to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: [EncryptedTokenManager] Generating access token. {\"mode\":\"legacy\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.INFO: [SocialAccountService] Refreshing token from provider {\"socialAccountId\":1372,\"provider\":\"hubspot\",\"refreshToken\":\"9aa73948c761da29dce46c177cf9aee1fde483a44169ca38723f9f0597d7a8c4\",\"state\":\"full-refresh\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.ERROR: Failed to refresh HubSpot token {\"account_id\":1372,\"updated_at\":\"2025-10-02 14:47:06\",\"reason\":\"missing or invalid refresh token\",\"previous\":\"\"} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:14] local.NOTICE: Repairing HubSpot tokens end {\"total\":3,\"fixed\":0,\"failed\":3} {\"correlation_id\":\"bbd82b3b-6771-4dc8-9ed8-9dca02e2caf4\",\"trace_id\":\"d792b61c-6d65-4150-9dc9-a1c7614a0fcd\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d2635e96-e7ee-4241-bb3f-9b2aeace0557\",\"trace_id\":\"d8169f7e-dd29-450a-bd52-098d1fea2512\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"conference:pre-meeting-reminder\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d2635e96-e7ee-4241-bb3f-9b2aeace0557\",\"trace_id\":\"d8169f7e-dd29-450a-bd52-098d1fea2512\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"3a977f84-7d65-4224-95b5-b18effb33083\",\"trace_id\":\"f48ac83a-e7f0-49f4-b7e3-15881e427646\"}\n[2026-04-22 13:11:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"jiminny:transcription:retry-failed\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"3a977f84-7d65-4224-95b5-b18effb33083\",\"trace_id\":\"f48ac83a-e7f0-49f4-b7e3-15881e427646\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Command] Starting polling service {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Service starting {\"memory_limit\":\"256M\",\"max_execution_time\":\"0\",\"initial_memory_mb\":62.0} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Acquired polling lock {\"expires_at\":\"2026-04-22T13:13:17.982589Z\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:17] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:18] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:19] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"ae02fafd-ce2b-4735-ad77-2dfc800d33fb\",\"trace_id\":\"e6aa5a99-c60b-4cad-bc38-c353b8cf2ff0\"}\n[2026-04-22 13:11:20] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:reset-governor\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"ae02fafd-ce2b-4735-ad77-2dfc800d33fb\",\"trace_id\":\"e6aa5a99-c60b-4cad-bc38-c353b8cf2ff0\"}\n[2026-04-22 13:11:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"55978b4e-7eeb-4466-825a-f001afeaa3aa\",\"trace_id\":\"2006d56f-acee-4f75-a195-b9dfc24c05c7\"}\n[2026-04-22 13:11:22] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"crm:bullhorn:ping\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"55978b4e-7eeb-4466-825a-f001afeaa3aa\",\"trace_id\":\"2006d56f-acee-4f75-a195-b9dfc24c05c7\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:23] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:28] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:11:43] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Getting offset from database {\"offset\":\"\",\"jiminny_team_id\":1} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal API] Fetching latest journal entry {\"url\":\"https://api.hubapi.com/webhooks/v4/journal/latest\"} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Auth] Requesting new client credentials token {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Auth] Successfully obtained new access token {\"expires_in\":1800,\"cached_for\":1500} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] No data {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.WARNING: [HubSpot Journal Polling] Maximum empty results reached, stopping {\"empty_results\":5,\"max_empty_results\":5} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Service ending {\"runtime_seconds\":57,\"total_cycles\":5,\"files_downloaded\":0,\"empty_files\":0,\"other_portal_skipped\":0,\"total_events\":0,\"events_per_file\":0,\"avg_api_ms\":267.6,\"avg_download_ms\":0.0,\"avg_transform_ms\":0.0,\"avg_process_ms\":0.0,\"peak_memory_mb\":99.72} {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:14] local.INFO: [HubSpot Journal Polling] Released polling lock {\"correlation_id\":\"330258e6-a872-4d5c-a061-b2e90bb8d78a\",\"trace_id\":\"69a3166f-2d2b-4b9c-897b-f836d5e7056b\"}\n[2026-04-22 13:12:17] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:18] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:18] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"meeting-bot:schedule-bot\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"e917e661-d88e-4022-acbf-0c39e15adebe\",\"trace_id\":\"e6c4e8f4-6290-48b2-ac12-0198ca4d0bc9\"}\n[2026-04-22 13:12:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"513c9a98-3234-4d38-b190-e95cfaab2fa2\",\"trace_id\":\"8ac119db-bd87-4950-97f9-612b4bed8744\"}\n[2026-04-22 13:12:31] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"dialers:monitor-activities\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"513c9a98-3234-4d38-b190-e95cfaab2fa2\",\"trace_id\":\"8ac119db-bd87-4950-97f9-612b4bed8744\"}\n[2026-04-22 13:12:36] local.NOTICE: Monitoring start {\"correlation_id\":\"1bfff069-f28b-4112-88ae-6323b4fa6e52\",\"trace_id\":\"a12a9006-d9e6-4df2-9570-452c6cbca611\"}\n[2026-04-22 13:12:37] local.NOTICE: Monitoring end {\"correlation_id\":\"1bfff069-f28b-4112-88ae-6323b4fa6e52\",\"trace_id\":\"a12a9006-d9e6-4df2-9570-452c6cbca611\"}\n[2026-04-22 13:12:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage before starting command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryPeakBeforeCommandInMb\":99.723} {\"correlation_id\":\"d97cb859-4b21-4e6c-a34e-784f1da94521\",\"trace_id\":\"190525e9-8a30-493b-ba43-eeb48653bcc9\"}\n[2026-04-22 13:12:44] local.INFO: Jiminny\\Console\\Commands\\Command::run Memory usage for command {\"command\":\"mailbox:skip-lists:refresh\",\"memoryBeforeCommandInMb\":62.0,\"memoryAfterCommandInMB\":62.0,\"memoryPeakBeforeCommandInMb\":99.723,\"memoryPeakAfterCommandInMB\":99.723} {\"correlation_id\":\"d97cb859-4b21-4e6c-a34e-784f1da94521\",\"trace_id\":\"190525e9-8a30-493b-ba43-eeb48653bcc9\"}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176139124294282505
|
5071408397395804077
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20157-AJ-report-not-se Project: faVsco.js, menu
JY-20157-AJ-report-not-send-notification, menu
Start Listening for PHP Debug Connections
AskJiminnyReportActivityServiceTest
Run 'AskJiminnyReportActivityServiceTest'
Debug 'AskJiminnyReportActivityServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
1
1
111
3
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Jiminny\Console\Commands;
use Carbon\Carbon;
use Illuminate\Console\Command;
use InvalidArgumentException;
use Jiminny\Jobs\AutomatedReports\RequestGenerateAskJiminnyReportJob;
use Jiminny\Jobs\AutomatedReports\SendReportMailJob;
use Jiminny\Jobs\JobDispatcherInterface;
use Jiminny\Models\Activity;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Services\Activity\CrmOwnerResolver;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
/**
* Class JiminnyDebugCommand
*
* @package Jiminny\Console\Commands
*/
class JiminnyDebugCommand extends Command
{
public const string FREQUENCY_DAILY = 'daily';
public const string FREQUENCY_WEEKLY = 'weekly';
public const string FREQUENCY_MONTHLY = 'monthly';
public const string FREQUENCY_QUARTERLY = 'quarterly';
public const string FREQUENCY_ONE_OFF = 'one_off';
protected $signature = 'jiminny:debug';
public function handle(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService): void
{
$from = $now->copy()->previousWeekday()->startOfDay();
$to = $now->copy()->previousWeekday()->endOfDay();
$report = AutomatedReport::find(71);
$job = new RequestGenerateAskJiminnyReportJob($report->getUuid());
$jobDispatcher->dispatch($job);
exit(1);
// $this->formatDate($jobDispatcher);
// $this->sendMail($jobDispatcher, $automatedReportsService);
// $this->crmService();
$this->getPayload($automatedReportsService);
exit(1);
}
private function crmService()
{
$activity = Activity::find(418141);
$team = Team::find(19);
$config = $team->getCrmConfiguration();
$crmResolver = app(CrmOwnerResolver::class, [
'team' => $team,
'integrationAdmin' => $team->getOwner(),
'providerSlug' => $config->getProviderName(),
]);
$crmService = $crmResolver->prepareCrmService();
$crmService->createTranscriptNotes($activity);
}
private function sendMail(JobDispatcherInterface $jobDispatcher, AutomatedReportsService $automatedReportsService)
{
$reportUuid = '';
// $report = $automatedReportsService->getReportResult($reportUuid);
$report = AutomatedReportResult::find(275);
$validRecipients = $automatedReportsService->getValidRecipientUsers(
$report->getReport(),
includeJiminny: true,
);
$recipient = $validRecipients[0];
$fileName = $automatedReportsService->getReportFileName($report);
$typeName = $report->getReport()->getCustomName()
?? $automatedReportsService->getReportTypeName($report);
$teamsName = $automatedReportsService->getReportTeamsName($report);
$periodName = $automatedReportsService->getReportPeriodName($report);
$s3Path = $automatedReportsService->getMediaPath($report);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$fileName ' . PHP_EOL . print_r($fileName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$typeName ' . PHP_EOL . print_r($typeName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$teamsName ' . PHP_EOL . print_r($teamsName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$periodName ' . PHP_EOL . print_r($periodName, true));
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$s3Path ' . PHP_EOL . print_r($s3Path, true));
$jobDispatcher->dispatch(
new SendReportMailJob(
reportUuid: $report->getUuid(),
s3Path: $s3Path,
recipientEmail: $recipient['email'],
recipientName: $recipient['name'] ?? null,
fileName: $fileName,
typeName: $typeName,
teamsName: $teamsName,
periodName: $periodName,
isAskJiminny: true,
)
);
exit(1);
}
private function formatDate(JobDispatcherInterface $jobDispatcher): void
{
$customName = 'Custom report name';
// $frequency = self::FREQUENCY_DAILY;
// $frequency = self::FREQUENCY_WEEKLY;
$frequency = self::FREQUENCY_MONTHLY;
// $frequency = self::FREQUENCY_QUARTERLY;
// $frequency = self::FREQUENCY_ONE_OFF;
$period = $this->calculateFromAndToDatePeriod($frequency);
$from = $period['fromDate'];
$to = $period['toDate'];
$periodName = $this->formatReportPeriodName($frequency, $from, $to);
$filenameSuffix = null;
if ($customName) {
if ($filenameSuffix) {
$customName .= " {$filenameSuffix}";
}
$result = $this->sanitizeFileName("{$customName} - {$periodName}");
}
$this->info($result);
}
public function calculateFromAndToDatePeriod(
string $frequency,
?Carbon $fromDate = null,
?Carbon $toDate = null
): array {
if ($frequency === self::FREQUENCY_ONE_OFF) {
return [
'fromDate' => $fromDate,
'toDate' => $toDate,
];
}
$now = Carbon::now();
return match ($frequency) {
self::FREQUENCY_DAILY => [
'fromDate' => $now->copy()->subDay()->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_WEEKLY => [
'fromDate' => $now->copy()->subWeeks(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_MONTHLY => [
'fromDate' => $now->copy()->subMonths(1)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
self::FREQUENCY_QUARTERLY => [
'fromDate' => $now->copy()->subMonths(3)->startOfDay(),
'toDate' => $now->copy()->subDay()->endOfDay(),
],
default => throw new InvalidArgumentException("Unsupported frequency: {$frequency}"),
};
}
private function formatReportPeriodName(string $frequency, Carbon $from, Carbon $to): string
{
$fromYear = $from->format('Y');
$toYear = $to->format('Y');
$differentYears = $fromYear !== $toYear;
switch ($frequency) {
case self::FREQUENCY_DAILY:
return $from->format('j M Y');
case self::FREQUENCY_QUARTERLY:
// 'Jan-Mar 2025' or 'Nov 2024-Jan 2025' if years differ
$startMonth = $from->format('M');
$endMonth = $to->copy()->subMonth();
$endMonthName = $endMonth->format('M');
$endMonthYear = $endMonth->format('Y');
if ($differentYears) {
return "{$startMonth} {$fromYear} - {$endMonthName} {$endMonthYear}";
}
return "{$startMonth} - {$endMonthName} {$toYear}";
case self::FREQUENCY_MONTHLY:
// 'May 2025' - monthly reports are always within the same year
return $from->format('M Y');
case self::FREQUENCY_WEEKLY:
// '4 - 8 Aug 2025', '27 Oct - 3 Nov 2025', or '28 Dec 2024 - 3 Jan 2025' if years differ
$startDay = $from->format('j');
$endDay = $to->format('j');
$startMonth = $from->format('M');
$endMonth = $to->format('M');
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
if ($startMonth !== $endMonth) {
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
}
return "{$startDay} - {$endDay} {$endMonth} {$toYear}";
case self::FREQUENCY_ONE_OFF:
// '2 May-31 May 2025' or '15 Dec 2024-15 Jan 2025' if years differ
$startDay = $from->format('j');
$startMonth = $from->format('M');
$endDay = $to->format('j');
$endMonth = $to->format('M');
// If same month and year, use a format like '2-31 May 2025'
if ($startMonth === $endMonth && ! $differentYears) {
return "{$startDay} - {$endDay} {$startMonth} {$toYear}";
}
// If different years, include both years
if ($differentYears) {
return "{$startDay} {$startMonth} {$fromYear} - {$endDay} {$endMonth} {$toYear}";
}
// Same year but different months
return "{$startDay} {$startMonth} - {$endDay} {$endMonth} {$toYear}";
default:
// Default format for unknown frequencies
return $from->format('j M Y') . ' - ' . $to->format('j M Y');
}
}
public function sanitizeFileName(string $fileName): string
{
return str_replace(['/', '\\'], '-', $fileName);
}
private function getPayload(AutomatedReportsService $automatedReportsService)
{
$reportResult = AutomatedReportResult::find(269);
$automatedReport = $reportResult->getReport();
$activityIds = [1,2,3];
$payload = $automatedReportsService->getAskJiminnyGenerateReportPayload(
automatedReport: $automatedReport,
reportResult: $reportResult,
activityIds: $activityIds,
);
\Illuminate\Support\Facades\Log::channel('custom_channel')->info('$payload ' . PHP_EOL . print_r($payload, true));
}
}
Sync Changes
Hide This Notification
Code changed:
Hide
894
Previous Highlighted Error
Next Highlighted Error
[2026-04-22 12:56:51] local.INFO: [automated-reports] Started {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Checking conditions {"isMonday":false,"isFirstDayOfMonth":false,"currentMonth":4,"isQuarterlyMonth":true} {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Processing daily reports {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Found 1 daily reports to process {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Dispatching Generate Report job for report {"reportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","teamId":1,"frequency":"weekly","type":"ask_jiminny"} {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:51] local.INFO: [automated-reports] Completed {"correlation_id":"8e19edf8-e0ff-4fed-8dbe-262f5dc720d4","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:52] local.INFO: [AskJiminnyReport:Generate] Started {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43"} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport] Fetched activity IDs for saved search {"saved_search_id":1977,"user_id":143,"activity_count":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Fetched activity IDs {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","activityCount":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Not enough activities, skipped {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","activityCount":0} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [AskJiminnyReport:Generate] Dispatched not-generated notifications {"automatedReportUuid":"4f6ca2b5-1993-48aa-99ad-b66f19f15d43","recipientsCount":1} {"correlation_id":"8a73461c-4e2b-4f6d-81f0-40367c09822d","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:56:53] local.INFO: [Send Report Not Generated Mail] Email sent {"uuid":"dcb12181-9de1-4ef0-9d45-fb4ea6fd0778","email":"[EMAIL]","recipientName":"Lukas Kovalik"} {"correlation_id":"fdf99c5e-56cc-4478-ab54-250fc09fb443","trace_id":"63846b9c-c6ed-499e-8469-25c651aaf84f"}
[2026-04-22 12:57:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"8f891f7b-2c3d-4813-a810-922d3c3ff04b","trace_id":"7ea4600f-fe5e-4041-8ef1-207cf5dfacba"}
[2026-04-22 12:57:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"23c760c9-672e-4166-a16d-e55db7824744","trace_id":"683fff63-372b-4638-9ebe-d1b0d7cd47b9"}
[2026-04-22 12:57:04] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"23c760c9-672e-4166-a16d-e55db7824744","trace_id":"683fff63-372b-4638-9ebe-d1b0d7cd47b9"}
[2026-04-22 12:57:06] local.NOTICE: Monitoring start {"correlation_id":"93748590-5bcc-4b5e-82a2-9cd195faadc8","trace_id":"788e496b-9a54-46ef-a822-45932aabd9ac"}
[2026-04-22 12:57:06] local.NOTICE: Monitoring end {"correlation_id":"93748590-5bcc-4b5e-82a2-9cd195faadc8","trace_id":"788e496b-9a54-46ef-a822-45932aabd9ac"}
[2026-04-22 12:57:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"f7252a17-bc62-4f94-afe0-ccfd221e69b7","trace_id":"1592110b-35f8-420a-83a2-a24fb4d4a5fa"}
[2026-04-22 12:57:07] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"f7252a17-bc62-4f94-afe0-ccfd221e69b7","trace_id":"1592110b-35f8-420a-83a2-a24fb4d4a5fa"}
[2026-04-22 12:57:08] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: [EmailSchedule] FINISHED batch process {"host":"docker_lamp_1","processed":0} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:08] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"ebac391b-93d6-4f58-9e1b-cbd191d7a9cb","trace_id":"1178bb4a-0ff0-4592-8041-c44780544424"}
[2026-04-22 12:57:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: [EmailSchedule] STARTING batch create {"host":"docker_lamp_1"} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: [EmailSchedule] FINISHED batch create {"host":"docker_lamp_1"} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:10] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:batch:create","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"bd79807d-f781-4ab2-a534-de2e8817a0c3","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:57:11] local.INFO: [Jiminny\Jobs\Mailbox\CreateBatches] processed 2 inboxes and created 1 batches {"userId":null,"batchSize":30,"maxBatches":1000} {"correlation_id":"a4eecb2f-a606-43af-b9bd-0941ef3f15c1","trace_id":"cfcd8a63-b93b-4b43-a262-f99f08865655"}
[2026-04-22 12:58:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:03] local.INFO: [ScheduleBotCommand] Number of activities to be captured: 0 {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:03] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"meeting-bot:schedule-bot","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"2893f84a-555c-4fc8-a8c8-128c7e3ffc21","trace_id":"7ba30dd2-e0d1-4b47-b23d-2ab8a2944007"}
[2026-04-22 12:58:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"4f659da1-6b2c-492a-bdb8-db3789f92e86","trace_id":"5f899a25-4450-47e9-ada0-a83001bd00be"}
[2026-04-22 12:58:05] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"dialers:monitor-activities","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"4f659da1-6b2c-492a-bdb8-db3789f92e86","trace_id":"5f899a25-4450-47e9-ada0-a83001bd00be"}
[2026-04-22 12:58:07] local.NOTICE: Monitoring start {"correlation_id":"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0","trace_id":"ad240a18-b6d7-43d8-a9a6-d56613965203"}
[2026-04-22 12:58:07] local.NOTICE: Monitoring end {"correlation_id":"c45f0584-bcf3-44c9-b9a2-7f6ea9ce66c0","trace_id":"ad240a18-b6d7-43d8-a9a6-d56613965203"}
[2026-04-22 12:58:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"4739d379-46ac-41e7-a396-1365033ae798","trace_id":"bb579ad2-7e23-4512-822c-2447def47d44"}
[2026-04-22 12:58:13] local.INFO: Jiminny\Console\Commands\Command::run Memory usage for command {"command":"mailbox:skip-lists:refresh","memoryBeforeCommandInMb":62.0,"memoryAfterCommandInMB":62.0,"memoryPeakBeforeCommandInMb":99.723,"memoryPeakAfterCommandInMB":99.723} {"correlation_id":"4739d379-46ac-41e7-a396-1365033ae798","trace_id":"bb579ad2-7e23-4512-822c-2447def47d44"}
[2026-04-22 12:58:21] local.INFO: Jiminny\Console\Commands\Command::run Memory usage before starting command {"command":"mailbox:batch:process","memoryBeforeCommandInMb":62.0,"memoryPeakBeforeCommandInMb":99.723} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EmailSchedule] STARTING batch process {"host":"docker_lamp_1"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: Processing email batch 98408 for inbox 212 {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1354,"provider":"google"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1354,"provider":"google"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:21] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db54231f2fc510","from":"Sentry <[EMAIL]>","to":"[EMAIL]","cc":null} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db54231f2fc510","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db54231f2fc510","message_id":"<[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53f91158f746","from":"Nikolay Yankov <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Push <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53f91158f746","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53f91158f746","message_id":"<jiminny/prophet/pull/490/before/542d2c39143ba7a97af460a1362f4baa33a2b957/after/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53a58ac8cee4","from":"\"claude[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53a58ac8cee4","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53a58ac8cee4","message_id":"<jiminny/prophet/pull/490/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53a03c6854a8","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53a03c6854a8","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53a03c6854a8","message_id":"<jiminny/prophet/pull/490/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53948b59b0c0","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53948b59b0c0","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53948b59b0c0","message_id":"<jiminny/prophet/pull/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53831a6e4fc5","from":"\"sonarqubecloud[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53831a6e4fc5","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53831a6e4fc5","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53521076b35f","from":"Sentry <[EMAIL]>","to":"[EMAIL]","cc":null} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53521076b35f","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53521076b35f","message_id":"<[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532f4c2523b0","from":"\"claude[bot]\" <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532f4c2523b0","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532f4c2523b0","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532f07d5af3b","from":"Nikolay Yankov <[EMAIL]>","to":"\"jiminny/app\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:24] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532f07d5af3b","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532f07d5af3b","message_id":"<jiminny/app/pull/12001/issue_event/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db532ebf72fc9e","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/app\" <[EMAIL]>","cc":"Subscribed <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db532ebf72fc9e","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db532ebf72fc9e","message_id":"<jiminny/app/pull/12001/review/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db5329f655605f","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db5329f655605f","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db5329f655605f","message_id":"<jiminny/prophet/pull/489/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db5327670e5485","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Review requested <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db5327670e5485","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db5327670e5485","message_id":"<jiminny/prophet/pull/489/issue_event/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: Processing an email from inbox batch {"batch":98408,"inbox_id":212,"email":"[EMAIL]","email_id":"19db53231f82ecf7","from":"steliyan-g <[EMAIL]>","to":"\"jiminny/prophet\" <[EMAIL]>","cc":"Lukas Kovalik <[EMAIL]>, Push <[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Fetching token {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [SocialAccountService] Token retrieved {"socialAccountId":1500,"provider":"salesforce"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EncryptedTokenManager] Generating access token. {"mode":"legacy"} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [CrmOwnerResolver] Integration owner matched as CRM Owner {"crm_provider":"salesforce","crm_owner":143,"team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsResolver] The sender email is blacklisted, skipping {"email":"[EMAIL]","inbox_id":212,"message_provider_id":"19db53231f82ecf7","team_id":1} {"correlation_id":"b4d5498b-7884-4951-b407-0f04e87c7643","trace_id":"64cef288-27e5-4a85-92bb-6f3ea826f4c1"}
[2026-04-22 12:58:25] local.INFO: [EmailImport\ParticipantsValidator] Email participants are less than 2 {"inbox_id":212,"message_provider_id":"19db53231f82ecf7","message_id":"<jiminny/prophet/pull/489/before/eec786e5bc9ffb3ab4ab057ee21376f73e1874f4/after/[EMAIL]>"} {"correlation_id":"b4d5498b-7884-4951-b407-0...
|
71683
|
|
65988
|
1478
|
0
|
2026-04-21T13:24:35.962404+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777875962_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
65981
|
|
65990
|
1477
|
1
|
2026-04-21T13:25:07.470456+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777907470_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
65991
|
1478
|
1
|
2026-04-21T13:25:09.573243+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777909573_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
65992
|
1477
|
2
|
2026-04-21T13:25:38.000063+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776777938000_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
65990
|
|
66018
|
1478
|
14
|
2026-04-21T13:27:44.849050+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778064849_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44082448,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.4507979,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46077126,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47007978,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.47972074,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.4870346,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66016
|
|
66019
|
1477
|
16
|
2026-04-21T13:27:46.524780+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778066524_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66029
|
1477
|
21
|
2026-04-21T13:28:58.431668+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778138431_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66026
|
|
66112
|
NULL
|
0
|
2026-04-21T13:39:41.668136+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778781668_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66109
|
|
66113
|
NULL
|
0
|
2026-04-21T13:39:43.448755+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778783448_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66128
|
1484
|
8
|
2026-04-21T13:41:33.086613+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778893086_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66127
|
|
66129
|
1483
|
6
|
2026-04-21T13:41:33.086752+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778893086_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66138
|
1483
|
11
|
2026-04-21T13:42:18.323178+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778938323_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66136
|
|
66139
|
1484
|
13
|
2026-04-21T13:42:18.711496+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778938711_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66135
|
|
66147
|
1483
|
16
|
2026-04-21T13:42:54.105089+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778974105_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66148
|
1484
|
17
|
2026-04-21T13:42:54.376563+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778974376_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66146
|
|
66152
|
1484
|
20
|
2026-04-21T13:43:08.715796+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778988715_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66153
|
1483
|
18
|
2026-04-21T13:43:10.117644+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776778990117_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.016666668,"height":0.02111111},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.016666668,"height":0.02111111},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.015277778,"height":0.02111111},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.016666668,"height":0.02111111},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66355
|
1491
|
27
|
2026-04-21T14:38:13.136198+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776782293136_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66353
|
|
66356
|
1492
|
46
|
2026-04-21T14:38:15.226894+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776782295226_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.44115692,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.45113033,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.46110374,"top":0.17478053,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.47041222,"top":0.17478053,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.4800532,"top":0.17318435,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.48736703,"top":0.17318435,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.4956782,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.5043218,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.5152925,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.52393615,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.5325798,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.54355055,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.55452126,"top":0.14844373,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.58111703,"top":0.14844373,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.59208775,"top":0.14844373,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.6599069,"top":0.14844373,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.63231385,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.64394945,"top":0.17318435,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.6555851,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.6655585,"top":0.17318435,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.67519945,"top":0.17158818,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.6825133,"top":0.17158818,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66354
|
|
66359
|
1491
|
29
|
2026-04-21T14:38:24.289242+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776782304289_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66357
|
|
66392
|
1494
|
13
|
2026-04-21T14:40:14.977090+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776782414977_m2.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"#11894 on JY-18909-automated-reports-ask-jiminny, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.12134308,"height":0.025538707},"help_text":"Pull request #11894 exists for current branch JY-18909-automated-reports-ask-jiminny","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"bounds":{"left":0.8161569,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"AutomatedReportsRepositoryTest","depth":6,"bounds":{"left":0.83144945,"top":0.019952115,"width":0.084109046,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.63829786,"top":0.15003991,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"bounds":{"left":0.64827126,"top":0.15003991,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.65824467,"top":0.15003991,"width":0.00731383,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"bounds":{"left":0.6675532,"top":0.15003991,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.6771942,"top":0.14844373,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.68450797,"top":0.14844373,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"bounds":{"left":0.6928192,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.70146275,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.7124335,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.72107714,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.7297208,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.7406915,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.75166225,"top":0.123703115,"width":0.024268618,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.77825797,"top":0.123703115,"width":0.008643617,"height":0.01915403},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.78922874,"top":0.123703115,"width":0.029587766,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.9587766,"top":0.123703115,"width":0.02825798,"height":0.01915403},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.9311835,"top":0.14844373,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"bounds":{"left":0.9428192,"top":0.14844373,"width":0.009640957,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.9544548,"top":0.14844373,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.9644282,"top":0.14844373,"width":0.007978723,"height":0.015163607},"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.9740692,"top":0.14684756,"width":0.00731383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.98138297,"top":0.14684756,"width":0.006981383,"height":0.018355945},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
|
66393
|
1493
|
16
|
2026-04-21T14:40:19.777209+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-21/1776 /Users/lukas/.screenpipe/data/data/2026-04-21/1776782419777_m1.jpg...
|
PhpStorm
|
faVsco.js – AutomatedReportsRepositoryTest.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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"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":"AutomatedReportsRepositoryTest","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'AutomatedReportsRepositoryTest'","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"5","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"9","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","depth":4,"value":"<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Unit\\Repositories;\n\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Support\\Collection as SupportCollection;\nuse Illuminate\\Support\\Facades\\DB;\nuse Jiminny\\Models\\AutomatedReport;\nuse Jiminny\\Models\\AutomatedReportResult;\nuse Jiminny\\Models\\Team;\nuse Jiminny\\Models\\User;\nuse Jiminny\\Repositories\\AutomatedReportsRepository;\nuse Jiminny\\Services\\Kiosk\\AutomatedReports\\AutomatedReportsService;\nuse Mockery;\nuse ReflectionMethod;\nuse Tests\\TestCase;\n\nclass AutomatedReportsRepositoryTest extends TestCase\n{\n protected function setUp(): void\n {\n parent::setUp();\n $this->withoutMockingConsoleOutput();\n }\n\n /**\n * Test the update method.\n */\n public function testUpdate(): void\n {\n // Create a mock of AutomatedReport\n $reportMock = $this->createMock(AutomatedReport::class);\n\n // Set up the update method to return true\n $reportMock->expects($this->once())\n ->method('update')\n ->with(['type' => 'updated_type'])\n ->willReturn(true);\n\n // Create the repository and call the update method\n $repository = new AutomatedReportsRepository();\n $result = $repository->update($reportMock, ['type' => 'updated_type']);\n\n // Assert that the result is the report mock\n $this->assertSame($reportMock, $result);\n }\n\n /**\n * Test the create method by mocking the static create method.\n */\n public function testCreate(): void\n {\n $data = ['team_id' => 1, 'type' => 'test_type'];\n $report = $this->createMock(AutomatedReport::class);\n\n // Use reflection to replace the create method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['create'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('create')\n ->with($data)\n ->willReturn($report);\n\n $result = $repository->create($data);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when a report is found.\n */\n public function testFindByUuidWithExistingReport(): void\n {\n $uuid = 'test-uuid';\n $report = $this->createMock(AutomatedReport::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn($report);\n\n $result = $repository->findByUuid($uuid);\n $this->assertSame($report, $result);\n }\n\n /**\n * Test the findByUuid method when no report is found.\n */\n public function testFindByUuidWithNonExistingReport(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findByUuid($uuid);\n $this->assertNull($result);\n }\n\n public function testGetAllStandardReports(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n $this->assertSame($collection, $result);\n }\n\n /**\n * Test the createResult method.\n */\n public function testCreateResult(): void\n {\n $data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['createResult'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('createResult')\n ->with($data)\n ->willReturn($reportResult);\n\n $result = $repository->createResult($data);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when a result is found.\n */\n public function testFindResultByUuidWithExistingResult(): void\n {\n $uuid = 'test-uuid';\n $reportResult = $this->createMock(AutomatedReportResult::class);\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn($reportResult);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertSame($reportResult, $result);\n }\n\n /**\n * Test the findResultByUuid method when no result is found.\n */\n public function testFindResultByUuidWithNonExistingResult(): void\n {\n $uuid = 'non-existing-uuid';\n\n // Use a partial mock of the repository to test the method\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['findResultByUuid'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('findResultByUuid')\n ->with($uuid)\n ->willReturn(null);\n\n $result = $repository->findResultByUuid($uuid);\n $this->assertNull($result);\n }\n\n /**\n * Test the getReportIdsByTeam method.\n */\n public function testGetReportIdsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportsByTeam method.\n */\n public function testGetReportsByTeam(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getResultsByReport method.\n */\n public function testGetResultsByReport(): void\n {\n // Skip this test since it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');\n }\n\n /**\n * Test the getReportResultsQueryForRetention method.\n */\n public function testGetReportResultsQueryForRetention(): void\n {\n // Skip this test for now - it requires more complex mocking\n $this->markTestSkipped('This test requires more complex mocking of query builder');\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method without team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithoutFilter(): void\n {\n // Setup\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // No 'where' call expected\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults();\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n /**\n * Test the getTeamIdsWithReportsResults method with team ID filter.\n */\n public function testGetTeamIdsWithReportsResultsWithFilter(): void\n {\n // Setup\n $teamId = 123;\n $expectedCollection = Mockery::mock(SupportCollection::class);\n\n // Mock DB facade\n $queryBuilder = Mockery::mock('Illuminate\\Database\\Query\\Builder');\n\n DB::shouldReceive('table')\n ->once()\n ->with('automated_reports')\n ->andReturn($queryBuilder);\n\n $queryBuilder->shouldReceive('join')\n ->once()\n ->with('teams', 'automated_reports.team_id', '=', 'teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('select')\n ->once()\n ->with('teams.id')\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('distinct')\n ->once()\n ->andReturnSelf();\n\n // 'where' call expected with team ID\n $queryBuilder->shouldReceive('where')\n ->once()\n ->with('teams.id', $teamId)\n ->andReturnSelf();\n\n $queryBuilder->shouldReceive('pluck')\n ->once()\n ->with('teams.id')\n ->andReturn($expectedCollection);\n\n // Execute\n $repository = new AutomatedReportsRepository();\n $result = $repository->getTeamIdsWithReportsResults($teamId);\n\n // Verify\n $this->assertSame($expectedCollection, $result);\n }\n\n public function testGetAllStandardReportsReturnsDelegatedCollection(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->with('created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports('created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAllStandardReportsDefaultParameters(): void\n {\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAllStandardReports'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAllStandardReports')\n ->willReturn($collection);\n\n $result = $repository->getAllStandardReports();\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_at', 'desc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserDefaultParameters(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user)\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user);\n\n $this->assertSame($collection, $result);\n }\n\n public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void\n {\n $user = $this->createMock(User::class);\n $collection = $this->createMock(Collection::class);\n\n $repository = $this->getMockBuilder(AutomatedReportsRepository::class)\n ->onlyMethods(['getAskJiminnyReportsByUser'])\n ->getMock();\n\n $repository->expects($this->once())\n ->method('getAskJiminnyReportsByUser')\n ->with($user, 'created_by', 'asc')\n ->willReturn($collection);\n\n $result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');\n\n $this->assertSame($collection, $result);\n }\n\n public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(7);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`groups`', $sql);\n\n $this->assertContains(100, $bindings);\n $this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n }\n\n public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void\n {\n $user = $this->createMock(User::class);\n $user->method('getId')->willReturn(42);\n $user->method('getTeamId')->willReturn(100);\n $user->method('getGroupId')->willReturn(null);\n\n $query = AutomatedReport::query();\n\n $this->invokeApplyUserAccessScope($query, $user);\n\n $sql = $query->toSql();\n $bindings = $query->getBindings();\n\n $this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);\n $this->assertStringContainsString('`automated_reports`.`recipients`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);\n $this->assertStringNotContainsString('`automated_reports`.`type`', $sql);\n $this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);\n $this->assertContains(100, $bindings);\n }\n\n private function invokeApplyUserAccessScope(object $query, User $user): void\n {\n $repository = new AutomatedReportsRepository();\n $method = new ReflectionMethod($repository, 'applyUserAccessScope');\n $method->setAccessible(true);\n $method->invoke($repository, $query, $user);\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"18","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"14","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","depth":4,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM automated_reports where id = 68;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE `automated_report_results`.`generated_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$.\"users\"')\n;\n\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-9176130278548829292
|
-6932414698814794163
|
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
AutomatedReportsRepositoryTest
Run 'AutomatedReportsRepositoryTest'
Debug 'AutomatedReportsRepositoryTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
2
5
1
9
Previous Highlighted Error
Next Highlighted Error
<?php
declare(strict_types=1);
namespace Tests\Unit\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as SupportCollection;
use Illuminate\Support\Facades\DB;
use Jiminny\Models\AutomatedReport;
use Jiminny\Models\AutomatedReportResult;
use Jiminny\Models\Team;
use Jiminny\Models\User;
use Jiminny\Repositories\AutomatedReportsRepository;
use Jiminny\Services\Kiosk\AutomatedReports\AutomatedReportsService;
use Mockery;
use ReflectionMethod;
use Tests\TestCase;
class AutomatedReportsRepositoryTest extends TestCase
{
protected function setUp(): void
{
parent::setUp();
$this->withoutMockingConsoleOutput();
}
/**
* Test the update method.
*/
public function testUpdate(): void
{
// Create a mock of AutomatedReport
$reportMock = $this->createMock(AutomatedReport::class);
// Set up the update method to return true
$reportMock->expects($this->once())
->method('update')
->with(['type' => 'updated_type'])
->willReturn(true);
// Create the repository and call the update method
$repository = new AutomatedReportsRepository();
$result = $repository->update($reportMock, ['type' => 'updated_type']);
// Assert that the result is the report mock
$this->assertSame($reportMock, $result);
}
/**
* Test the create method by mocking the static create method.
*/
public function testCreate(): void
{
$data = ['team_id' => 1, 'type' => 'test_type'];
$report = $this->createMock(AutomatedReport::class);
// Use reflection to replace the create method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['create'])
->getMock();
$repository->expects($this->once())
->method('create')
->with($data)
->willReturn($report);
$result = $repository->create($data);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when a report is found.
*/
public function testFindByUuidWithExistingReport(): void
{
$uuid = 'test-uuid';
$report = $this->createMock(AutomatedReport::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn($report);
$result = $repository->findByUuid($uuid);
$this->assertSame($report, $result);
}
/**
* Test the findByUuid method when no report is found.
*/
public function testFindByUuidWithNonExistingReport(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findByUuid'])
->getMock();
$repository->expects($this->once())
->method('findByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findByUuid($uuid);
$this->assertNull($result);
}
public function testGetAllStandardReports(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
/**
* Test the createResult method.
*/
public function testCreateResult(): void
{
$data = ['report_id' => 1, 'status' => AutomatedReportResult::STATUS_REQUESTED];
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['createResult'])
->getMock();
$repository->expects($this->once())
->method('createResult')
->with($data)
->willReturn($reportResult);
$result = $repository->createResult($data);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when a result is found.
*/
public function testFindResultByUuidWithExistingResult(): void
{
$uuid = 'test-uuid';
$reportResult = $this->createMock(AutomatedReportResult::class);
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn($reportResult);
$result = $repository->findResultByUuid($uuid);
$this->assertSame($reportResult, $result);
}
/**
* Test the findResultByUuid method when no result is found.
*/
public function testFindResultByUuidWithNonExistingResult(): void
{
$uuid = 'non-existing-uuid';
// Use a partial mock of the repository to test the method
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['findResultByUuid'])
->getMock();
$repository->expects($this->once())
->method('findResultByUuid')
->with($uuid)
->willReturn(null);
$result = $repository->findResultByUuid($uuid);
$this->assertNull($result);
}
/**
* Test the getReportIdsByTeam method.
*/
public function testGetReportIdsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportsByTeam method.
*/
public function testGetReportsByTeam(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getResultsByReport method.
*/
public function testGetResultsByReport(): void
{
// Skip this test since it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of Eloquent static calls');
}
/**
* Test the getReportResultsQueryForRetention method.
*/
public function testGetReportResultsQueryForRetention(): void
{
// Skip this test for now - it requires more complex mocking
$this->markTestSkipped('This test requires more complex mocking of query builder');
}
/**
* Test the getTeamIdsWithReportsResults method without team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithoutFilter(): void
{
// Setup
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// No 'where' call expected
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults();
// Verify
$this->assertSame($expectedCollection, $result);
}
/**
* Test the getTeamIdsWithReportsResults method with team ID filter.
*/
public function testGetTeamIdsWithReportsResultsWithFilter(): void
{
// Setup
$teamId = 123;
$expectedCollection = Mockery::mock(SupportCollection::class);
// Mock DB facade
$queryBuilder = Mockery::mock('Illuminate\Database\Query\Builder');
DB::shouldReceive('table')
->once()
->with('automated_reports')
->andReturn($queryBuilder);
$queryBuilder->shouldReceive('join')
->once()
->with('teams', 'automated_reports.team_id', '=', 'teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('select')
->once()
->with('teams.id')
->andReturnSelf();
$queryBuilder->shouldReceive('distinct')
->once()
->andReturnSelf();
// 'where' call expected with team ID
$queryBuilder->shouldReceive('where')
->once()
->with('teams.id', $teamId)
->andReturnSelf();
$queryBuilder->shouldReceive('pluck')
->once()
->with('teams.id')
->andReturn($expectedCollection);
// Execute
$repository = new AutomatedReportsRepository();
$result = $repository->getTeamIdsWithReportsResults($teamId);
// Verify
$this->assertSame($expectedCollection, $result);
}
public function testGetAllStandardReportsReturnsDelegatedCollection(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->with('created_at', 'desc')
->willReturn($collection);
$result = $repository->getAllStandardReports('created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAllStandardReportsDefaultParameters(): void
{
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAllStandardReports'])
->getMock();
$repository->expects($this->once())
->method('getAllStandardReports')
->willReturn($collection);
$result = $repository->getAllStandardReports();
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserReturnsDelegatedCollection(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_at', 'desc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_at', 'desc');
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserDefaultParameters(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user)
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user);
$this->assertSame($collection, $result);
}
public function testGetAskJiminnyReportsByUserAcceptsCustomSort(): void
{
$user = $this->createMock(User::class);
$collection = $this->createMock(Collection::class);
$repository = $this->getMockBuilder(AutomatedReportsRepository::class)
->onlyMethods(['getAskJiminnyReportsByUser'])
->getMock();
$repository->expects($this->once())
->method('getAskJiminnyReportsByUser')
->with($user, 'created_by', 'asc')
->willReturn($collection);
$result = $repository->getAskJiminnyReportsByUser($user, 'created_by', 'asc');
$this->assertSame($collection, $result);
}
public function testApplyUserAccessScopeWithGroupIncludesAllBranches(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(7);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringContainsString('`automated_reports`.`type` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`groups`', $sql);
$this->assertContains(100, $bindings);
$this->assertContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
}
public function testApplyUserAccessScopeWithoutGroupOmitsGroupBranch(): void
{
$user = $this->createMock(User::class);
$user->method('getId')->willReturn(42);
$user->method('getTeamId')->willReturn(100);
$user->method('getGroupId')->willReturn(null);
$query = AutomatedReport::query();
$this->invokeApplyUserAccessScope($query, $user);
$sql = $query->toSql();
$bindings = $query->getBindings();
$this->assertStringContainsString('`automated_reports`.`team_id` = ?', $sql);
$this->assertStringContainsString('`automated_reports`.`recipients`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`groups`', $sql);
$this->assertStringNotContainsString('`automated_reports`.`type`', $sql);
$this->assertNotContains(AutomatedReportsService::TYPE_ASK_JIMINNY, $bindings);
$this->assertContains(100, $bindings);
}
private function invokeApplyUserAccessScope(object $query, User $user): void
{
$repository = new AutomatedReportsRepository();
$method = new ReflectionMethod($repository, 'applyUserAccessScope');
$method->setAccessible(true);
$method->invoke($repository, $query, $user);
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground
jiminny
Sync Changes
Hide This Notification
Code changed:
Hide
18
14
2
4
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM automated_reports where id = 68;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE `automated_report_results`.`generated_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 1635, '$."users"')
;
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
66391
|
|
24512
|
531
|
57
|
2026-04-15T12:25:09.022348+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-15/1776 /Users/lukas/.screenpipe/data/data/2026-04-15/1776255909022_m2.jpg...
|
NULL
|
NULL
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
CaudeFileEditViewWindowHelp• Not Secure | http://[ CaudeFileEditViewWindowHelp• Not Secure | http://[IP_ADDRESS]:8767/frames_fts_data/~ Google Geminip! Western Digital Red Plus 3.5 6TB 5400rpm 256MB SAiSl I SeneticТвърд диск, Western Digital Red 6TB Plus ( 3.5", 256N* SQLite Web: db.sqlitew Screenpipe DashboardV Welcome to Steam- New |aomenoe c re crmlal vomuialieIf you already have Terminal open, or preferusing it, you can command Finder to open thefolder for you.1. Open the Terminal app (you can find itby pressing Command + Space to openSpotlight and typing "Terminal").2. Type the following command: open~/. screenpipe3. Press Return. A new Finder window willimmediately pop up showing thecontents of the folder.Method 3: Unhide All Files in Your HomeDirectoryIf you want to be able to see the folderalongside your normal files so you can clickinto it manually.1. Open Finder.2. Go to your Home folder by pressingCommand + Shift + H (this is what the~ symbol represents).3. Press Command + Shift + . (Command,Shift, and the Period key at the sametime).4. You will see all your hidden files andfolders fade into view. Scroll down to findthe .screenpipe folder and double-click5. Note: You can press Command + Shift +• again to hide the files when you aredone to keep your folders looking clean.Ask GeminiPro vGemini is Al and can make mistakes, including about people.Your privacy and GeminiSummarize pagesqlite-web 0.7.2do.scllte Trames_tts_datatable name…saix miarationsaudio_chunksaudio_tagsaudio_transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_.audio_transcriptions_…audio_transcriptions_..elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (v)frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statespeaker_embeddingsspeakerssqlite_sequencetagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxVice• cnunksIvision laosToggle helper tablesStructureContentSQLCREATE TABLE 'frames_fts_daid INTEGER PRIMARY KEY,block BLOBColumnsColumnblockIndexesnamesulite database browser vo./.L, pg•..n<+ New chatQ SearchCustomizeQ ChatsProjects80 ArtifactsStarredBulgarian citizenship application...Dawarich location tracking projectRecentsLinux SQLite Ul for NASClaude API 500 internal server e...Screenpipe query capabilities a...eGPU compatibility with Mac mi..Understanding OpenRouter API ...Screenpipe 14-day retention exp...Reddit homepage feed overviewDocker container not visible in c...DIA browser RAM configurationScreenpipe company backgroundDSK Bank Bulgaria secure invest...Building a comprehensive perso...Importing Google Timeline data t...chromecast remote volume ouct.Screenpipe free version guideSelf-hosted LLM alternatives to …..Screenpipe database query setupRunning screenpipe for freeMac Studio network switch setupClaude extension in vivaldi brow...General intormation reauestRed dots on neck causesChange approvalQuerying Screenpipe with Claud...Setting up daily backups in Ugre…..Upcoming remindersAccessing tools in Open WebUlLaraver issue troublesnootingLukas KovalikPro nian, 0Sprint Review - in 35 m100% C"8 Wed 15 Apr 15:25:08ChatCoworkCodeLinux SQLite Ul for NAS7 uci Lexl cxLlacLcu Oll ll0t 1 dlllesWhat each file type isJPGs - event-driven snapshotsNamed like (1776255040486_m1. jpg) — the number is a millisecond timestamp, (m1)/ (m2) =monitor 1/monitor 2. These are captured the moment something meaningful happens — aclick, a keypress, an app switch, text appearing. Your frames data confirms this:capture_trigger = 'visual_change' | 'click'text_source'accessibility''ocr'So frame 24474 was a (click event, captured via accessibility APIs. Frame 24475 was avisual_change captured via ocr) (accessibility wasn't available for that app).MP4s - continuous background recordingNamed like compact_monitor_2_1776255640728.mp4 . Screenpipe records videocontinuously at 0.5 fps (one frame every 2 seconds) regardless of activity. Every few minutesit closes the current MP4 and opens a new one — that's why you have 526 of them over 6days. The (video_chunks table just stores the file path.Table-by-table explanationframes (485 MB, 24,367 rows) - the central table, one row per captured moment. Keycolumns:• (snapshot_path) → path to the JPG on disk• video_chunk_id → EK to an MPA (for video-sourced frames)• (capture_trigger → what caused the capture: Visual_change, click,idle fallback• (text_source) →(accessibility (fast, structural) or ocr) (fallback, slower)• (content_hash)/(simhash → deduplication - identical frames are skipped• (accessibility_tree_json → raw AX tree JSON (huge, explains the 485 MB)• (app_name), (window_name), (browser_url → context at capture timeocr_text (635 MB, 18,459 rows) - extracted text per frame. One row per frame, contains:• (text) → full concatenated text visible on screen at that moment(app_name), (window_name → copied from frames for fast querying•(ocr_engine) → Apple Vision (on Mac) or Tesseract fallback(focused → was this the active window?Note: fewer rows than frames (18,459 vs 24,3 / because accessibility-sourced framesstore text in (frames.full_text instead, notin ocr_text).Reply...+Sonnet 46 vclaude is Al and can make mistakes. rlease double-cneck responses....
|
NULL
|
-9175882020380160644
|
NULL
|
visual_change
|
ocr
|
NULL
|
CaudeFileEditViewWindowHelp• Not Secure | http://[ CaudeFileEditViewWindowHelp• Not Secure | http://[IP_ADDRESS]:8767/frames_fts_data/~ Google Geminip! Western Digital Red Plus 3.5 6TB 5400rpm 256MB SAiSl I SeneticТвърд диск, Western Digital Red 6TB Plus ( 3.5", 256N* SQLite Web: db.sqlitew Screenpipe DashboardV Welcome to Steam- New |aomenoe c re crmlal vomuialieIf you already have Terminal open, or preferusing it, you can command Finder to open thefolder for you.1. Open the Terminal app (you can find itby pressing Command + Space to openSpotlight and typing "Terminal").2. Type the following command: open~/. screenpipe3. Press Return. A new Finder window willimmediately pop up showing thecontents of the folder.Method 3: Unhide All Files in Your HomeDirectoryIf you want to be able to see the folderalongside your normal files so you can clickinto it manually.1. Open Finder.2. Go to your Home folder by pressingCommand + Shift + H (this is what the~ symbol represents).3. Press Command + Shift + . (Command,Shift, and the Period key at the sametime).4. You will see all your hidden files andfolders fade into view. Scroll down to findthe .screenpipe folder and double-click5. Note: You can press Command + Shift +• again to hide the files when you aredone to keep your folders looking clean.Ask GeminiPro vGemini is Al and can make mistakes, including about people.Your privacy and GeminiSummarize pagesqlite-web 0.7.2do.scllte Trames_tts_datatable name…saix miarationsaudio_chunksaudio_tagsaudio_transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_.audio_transcriptions_…audio_transcriptions_..elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (v)frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statespeaker_embeddingsspeakerssqlite_sequencetagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxVice• cnunksIvision laosToggle helper tablesStructureContentSQLCREATE TABLE 'frames_fts_daid INTEGER PRIMARY KEY,block BLOBColumnsColumnblockIndexesnamesulite database browser vo./.L, pg•..n<+ New chatQ SearchCustomizeQ ChatsProjects80 ArtifactsStarredBulgarian citizenship application...Dawarich location tracking projectRecentsLinux SQLite Ul for NASClaude API 500 internal server e...Screenpipe query capabilities a...eGPU compatibility with Mac mi..Understanding OpenRouter API ...Screenpipe 14-day retention exp...Reddit homepage feed overviewDocker container not visible in c...DIA browser RAM configurationScreenpipe company backgroundDSK Bank Bulgaria secure invest...Building a comprehensive perso...Importing Google Timeline data t...chromecast remote volume ouct.Screenpipe free version guideSelf-hosted LLM alternatives to …..Screenpipe database query setupRunning screenpipe for freeMac Studio network switch setupClaude extension in vivaldi brow...General intormation reauestRed dots on neck causesChange approvalQuerying Screenpipe with Claud...Setting up daily backups in Ugre…..Upcoming remindersAccessing tools in Open WebUlLaraver issue troublesnootingLukas KovalikPro nian, 0Sprint Review - in 35 m100% C"8 Wed 15 Apr 15:25:08ChatCoworkCodeLinux SQLite Ul for NAS7 uci Lexl cxLlacLcu Oll ll0t 1 dlllesWhat each file type isJPGs - event-driven snapshotsNamed like (1776255040486_m1. jpg) — the number is a millisecond timestamp, (m1)/ (m2) =monitor 1/monitor 2. These are captured the moment something meaningful happens — aclick, a keypress, an app switch, text appearing. Your frames data confirms this:capture_trigger = 'visual_change' | 'click'text_source'accessibility''ocr'So frame 24474 was a (click event, captured via accessibility APIs. Frame 24475 was avisual_change captured via ocr) (accessibility wasn't available for that app).MP4s - continuous background recordingNamed like compact_monitor_2_1776255640728.mp4 . Screenpipe records videocontinuously at 0.5 fps (one frame every 2 seconds) regardless of activity. Every few minutesit closes the current MP4 and opens a new one — that's why you have 526 of them over 6days. The (video_chunks table just stores the file path.Table-by-table explanationframes (485 MB, 24,367 rows) - the central table, one row per captured moment. Keycolumns:• (snapshot_path) → path to the JPG on disk• video_chunk_id → EK to an MPA (for video-sourced frames)• (capture_trigger → what caused the capture: Visual_change, click,idle fallback• (text_source) →(accessibility (fast, structural) or ocr) (fallback, slower)• (content_hash)/(simhash → deduplication - identical frames are skipped• (accessibility_tree_json → raw AX tree JSON (huge, explains the 485 MB)• (app_name), (window_name), (browser_url → context at capture timeocr_text (635 MB, 18,459 rows) - extracted text per frame. One row per frame, contains:• (text) → full concatenated text visible on screen at that moment(app_name), (window_name → copied from frames for fast querying•(ocr_engine) → Apple Vision (on Mac) or Tesseract fallback(focused → was this the active window?Note: fewer rows than frames (18,459 vs 24,3 / because accessibility-sourced framesstore text in (frames.full_text instead, notin ocr_text).Reply...+Sonnet 46 vclaude is Al and can make mistakes. rlease double-cneck responses....
|
NULL
|
|
80636
|
2130
|
30
|
2026-04-25T14:30:53.736790+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-25/1777 /Users/lukas/.screenpipe/data/data/2026-04-25/1777127453736_m2.jpg...
|
Firefox
|
Screenpipe — Archive — Personal
|
1
|
http://192.168.0.242:8766
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
DXP4800PLUS-B5F8
5 Signs You Have Successfully Hur DXP4800PLUS-B5F8
5 Signs You Have Successfully Hurt a Narcissist; - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
Close tab
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
Screenpipe [archive.db · 6175.9MB]
Screenpipe
[archive.db · 6175.9MB]
Activity
Search
Audio
Work Report
Timetable
AI Summary
Date
23
/
04
/
2026
Calendar
Monitor
Jump to
--
:
--
Go
APP TIMELINE · CLICK TO PLAY · DRAG SCROLLBAR TO PAN
−
32×
+
Follow
Follow
09:14
09:15
09:16
09:17
09:18
09:19
09:20
09:21
09:22
09:23
09:24
09:25
09:26
09:27
09:28
09:29
09:30
09:31
09:32
09:33
09:34
09:35
09:36
09:37
09:38
09:39
09:40
09:41
09:42
09:43
09:44
09:45
09:46
09:47
09:48
09:49
09:50
09:51
09:52
09:53
09:54
09:55
09:56
09:57
09:58
09:59
10:00
10:01...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"DXP4800PLUS-B5F8","depth":4,"bounds":{"left":0.0018284575,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"5 Signs You Have Successfully Hurt a Narcissist; - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.03856383,"top":0.0518755,"width":0.03656915,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"(56) Inbox | kovaliklukas@proton.me | Proton Mail","depth":4,"bounds":{"left":0.07513298,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Welcome back","depth":4,"bounds":{"left":0.0,"top":0.09497207,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Welcome back","depth":5,"bounds":{"left":0.013297873,"top":0.10614525,"width":0.025265958,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":4,"bounds":{"left":0.0,"top":0.12769353,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":5,"bounds":{"left":0.013297873,"top":0.13886672,"width":0.26263297,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Today's Deals","depth":4,"bounds":{"left":0.0,"top":0.16041501,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Today's Deals","depth":5,"bounds":{"left":0.013297873,"top":0.17158818,"width":0.024102394,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"architecture - screenpipe docs","depth":4,"bounds":{"left":0.0,"top":0.19313647,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"architecture - screenpipe docs","depth":5,"bounds":{"left":0.013297873,"top":0.20430966,"width":0.053523935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.22585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.23703113,"width":0.1747008,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Screenpipe — Archive","depth":4,"bounds":{"left":0.0,"top":0.2585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXStaticText","text":"Screenpipe — Archive","depth":5,"bounds":{"left":0.013297873,"top":0.2697526,"width":0.037898935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Close tab","depth":5,"bounds":{"left":0.10139628,"top":0.26576218,"width":0.007978723,"height":0.01915403},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"SQLite Web: archive.db","depth":4,"bounds":{"left":0.0,"top":0.29130086,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: archive.db","depth":5,"bounds":{"left":0.013297873,"top":0.30247405,"width":0.040724736,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SQLite Web: db.sqlite","depth":4,"bounds":{"left":0.0,"top":0.32402235,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: db.sqlite","depth":5,"bounds":{"left":0.013297873,"top":0.33519554,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Platform","depth":4,"bounds":{"left":0.0,"top":0.3567438,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Platform","depth":5,"bounds":{"left":0.013297873,"top":0.367917,"width":0.027925532,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":4,"bounds":{"left":0.0,"top":0.38946527,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":5,"bounds":{"left":0.013297873,"top":0.40063846,"width":0.09790558,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":4,"bounds":{"left":0.0,"top":0.42218676,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":5,"bounds":{"left":0.013297873,"top":0.43335995,"width":0.22556517,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":4,"bounds":{"left":0.0,"top":0.45490822,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":5,"bounds":{"left":0.013297873,"top":0.4660814,"width":0.08826463,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.48762968,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.49880287,"width":0.28075132,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gitea Official Website","depth":4,"bounds":{"left":0.0,"top":0.5203512,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gitea Official Website","depth":5,"bounds":{"left":0.013297873,"top":0.53152436,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":4,"bounds":{"left":0.0,"top":0.55307263,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":5,"bounds":{"left":0.013297873,"top":0.5642458,"width":0.10555186,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.0028257978,"top":0.58739024,"width":0.108211435,"height":0.025538707},"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.0028257978,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Le Chat Mistral (⌃X)","depth":6,"bounds":{"left":0.013796543,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.024933511,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.036070477,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Bitwarden","depth":6,"bounds":{"left":0.04720745,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXHeading","text":"Screenpipe [archive.db · 6175.9MB]","depth":7,"bounds":{"left":0.12034574,"top":0.061452515,"width":0.06499335,"height":0.017956903},"help_text":"","role_description":"heading","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Screenpipe","depth":8,"bounds":{"left":0.12034574,"top":0.06304868,"width":0.027759308,"height":0.014764565},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"[archive.db · 6175.9MB]","depth":9,"bounds":{"left":0.14943483,"top":0.06703911,"width":0.035904255,"height":0.009976057},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Activity","depth":7,"bounds":{"left":0.18999335,"top":0.059856344,"width":0.024767287,"height":0.0207502},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Search","depth":7,"bounds":{"left":0.21542554,"top":0.059856344,"width":0.023603724,"height":0.0207502},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Audio","depth":7,"bounds":{"left":0.23969415,"top":0.059856344,"width":0.021110373,"height":0.0207502},"help_text":"No audio data in this database","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Work Report","depth":7,"bounds":{"left":0.26146942,"top":0.059856344,"width":0.034906916,"height":0.0207502},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"Timetable","depth":7,"bounds":{"left":0.29704124,"top":0.059856344,"width":0.029753989,"height":0.0207502},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"AI Summary","depth":7,"bounds":{"left":0.3274601,"top":0.059856344,"width":0.034242023,"height":0.0207502},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Date","depth":8,"bounds":{"left":0.93849736,"top":0.0650439,"width":0.008144947,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"23","depth":9,"bounds":{"left":0.9552859,"top":0.06464485,"width":0.0048204786,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"/","depth":8,"bounds":{"left":0.96110374,"top":0.06464485,"width":0.0023271276,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"04","depth":9,"bounds":{"left":0.9644282,"top":0.06464485,"width":0.0048204786,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"/","depth":8,"bounds":{"left":0.970246,"top":0.06464485,"width":0.002493351,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"2026","depth":9,"bounds":{"left":0.9737367,"top":0.06464485,"width":0.009474734,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Calendar","depth":8,"bounds":{"left":0.98454124,"top":0.0650439,"width":0.0051529254,"height":0.010774142},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Monitor","depth":9,"bounds":{"left":0.34740692,"top":0.10853951,"width":0.013464096,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Jump to","depth":9,"bounds":{"left":0.7059508,"top":0.10853951,"width":0.01412899,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"--","depth":10,"bounds":{"left":0.72606385,"top":0.10814046,"width":0.0048204786,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":":","depth":9,"bounds":{"left":0.7318817,"top":0.10814046,"width":0.0023271276,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"--","depth":10,"bounds":{"left":0.7352061,"top":0.10814046,"width":0.0048204786,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"Go","depth":8,"bounds":{"left":0.75398934,"top":0.10454908,"width":0.012300532,"height":0.018754989},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"APP TIMELINE · CLICK TO PLAY · DRAG SCROLLBAR TO PAN","depth":10,"bounds":{"left":0.35239363,"top":0.14964086,"width":0.10571808,"height":0.009976057},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"−","depth":9,"bounds":{"left":0.7087766,"top":0.1452514,"width":0.009807181,"height":0.018754989},"help_text":"Zoom out","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"32×","depth":10,"bounds":{"left":0.72140956,"top":0.14924182,"width":0.0068151597,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"+","depth":9,"bounds":{"left":0.7312167,"top":0.1452514,"width":0.009640957,"height":0.018754989},"help_text":"Zoom in","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Follow","depth":10,"bounds":{"left":0.74418217,"top":0.14924182,"width":0.004654255,"height":0.011173184},"help_text":"","role_description":"checkbox","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Follow","depth":10,"bounds":{"left":0.75016624,"top":0.14924182,"width":0.011136968,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:14","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:15","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:16","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:17","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:18","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:19","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:20","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:21","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:22","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:23","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:24","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:25","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:26","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:27","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:28","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:29","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:30","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:31","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:32","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:33","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:34","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:35","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:36","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:37","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:38","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:39","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:40","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:41","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:42","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:43","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:44","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:45","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:46","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:47","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:48","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:49","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:50","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:51","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:52","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:53","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:54","depth":13,"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:55","depth":13,"bounds":{"left":0.0,"top":0.21947326,"width":0.008643617,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:56","depth":13,"bounds":{"left":0.0,"top":0.21947326,"width":0.008643617,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:57","depth":13,"bounds":{"left":0.0,"top":0.21947326,"width":0.008643617,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:58","depth":13,"bounds":{"left":0.038896278,"top":0.21947326,"width":0.00880984,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"09:59","depth":13,"bounds":{"left":0.08460771,"top":0.21947326,"width":0.00880984,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"10:00","depth":13,"bounds":{"left":0.12932181,"top":0.21947326,"width":0.008144947,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"10:01","depth":13,"bounds":{"left":0.17519946,"top":0.21947326,"width":0.0078125,"height":0.008778931},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9175555943839373031
|
5248724645513282191
|
click
|
accessibility
|
NULL
|
DXP4800PLUS-B5F8
5 Signs You Have Successfully Hur DXP4800PLUS-B5F8
5 Signs You Have Successfully Hurt a Narcissist; - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
Close tab
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
Screenpipe [archive.db · 6175.9MB]
Screenpipe
[archive.db · 6175.9MB]
Activity
Search
Audio
Work Report
Timetable
AI Summary
Date
23
/
04
/
2026
Calendar
Monitor
Jump to
--
:
--
Go
APP TIMELINE · CLICK TO PLAY · DRAG SCROLLBAR TO PAN
−
32×
+
Follow
Follow
09:14
09:15
09:16
09:17
09:18
09:19
09:20
09:21
09:22
09:23
09:24
09:25
09:26
09:27
09:28
09:29
09:30
09:31
09:32
09:33
09:34
09:35
09:36
09:37
09:38
09:39
09:40
09:41
09:42
09:43
09:44
09:45
09:46
09:47
09:48
09:49
09:50
09:51
09:52
09:53
09:54
09:55
09:56
09:57
09:58
09:59
10:00
10:01...
|
80633
|
|
81599
|
2172
|
52
|
2026-04-25T16:38:44.419857+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-25/1777 /Users/lukas/.screenpipe/data/data/2026-04-25/1777135124419_m2.jpg...
|
Firefox
|
DXP4800PLUS-B5F8 — Personal
|
1
|
nas.lakylak.xyz/desktop/#/
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
New Tab
MikroTik · CRS304-4XG-IN
MikroTik · CRS304-4XG-IN
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
4
KB/s
923
B/s
Files
Control Panel
Storage
App Center
Logs
Support
Task Manager
Universal Search
Music
Cloud Drives
Theater
Photos
Online Office
TextEdit
Virtual Machine
Downloads
DLNA
File Version Explorer
Security
Jellyfin-HT
SAN Manager
Vault
Snapshot
Comics
Sync & Backup
Control Panel
Search
Connection & Access
User Management
File Service
Device Connection
Domain/LDAP
Terminal
General
Hardware & Power
Time & Language
Network
Security
Indexing Service
Service
About
Update & Restore
Files
Personal Folder
Shared Folder
User Folder
Tag
Recycle Bin
Shared Folder
Shared Folder
Please enter
Name
Size
Type
Modification date
...
|
[{"role":"AXRadioButton","text [{"role":"AXRadioButton","text":"DXP4800PLUS-B5F8","depth":4,"bounds":{"left":0.0018284575,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":true},{"role":"AXRadioButton","text":"Inbox (7) - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.03856383,"top":0.0518755,"width":0.03656915,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"(56) Inbox | kovaliklukas@proton.me | Proton Mail","depth":4,"bounds":{"left":0.07513298,"top":0.0518755,"width":0.03673537,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXRadioButton","text":"Welcome back","depth":4,"bounds":{"left":0.0,"top":0.09497207,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Welcome back","depth":5,"bounds":{"left":0.013297873,"top":0.10614525,"width":0.025265958,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":4,"bounds":{"left":0.0,"top":0.12769353,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com","depth":5,"bounds":{"left":0.013297873,"top":0.13886672,"width":0.26263297,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Today's Deals","depth":4,"bounds":{"left":0.0,"top":0.16041501,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Today's Deals","depth":5,"bounds":{"left":0.013297873,"top":0.17158818,"width":0.024102394,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"architecture - screenpipe docs","depth":4,"bounds":{"left":0.0,"top":0.19313647,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"architecture - screenpipe docs","depth":5,"bounds":{"left":0.013297873,"top":0.20430966,"width":0.053523935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.22585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Code works better when you stop treating it like a machine - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.23703113,"width":0.1747008,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Screenpipe — Archive","depth":4,"bounds":{"left":0.0,"top":0.2585794,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Screenpipe — Archive","depth":5,"bounds":{"left":0.013297873,"top":0.2697526,"width":0.037898935,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SQLite Web: archive.db","depth":4,"bounds":{"left":0.0,"top":0.29130086,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: archive.db","depth":5,"bounds":{"left":0.013297873,"top":0.30247405,"width":0.040724736,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"SQLite Web: db.sqlite","depth":4,"bounds":{"left":0.0,"top":0.32402235,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"SQLite Web: db.sqlite","depth":5,"bounds":{"left":0.013297873,"top":0.33519554,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Claude Platform","depth":4,"bounds":{"left":0.0,"top":0.3567438,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Claude Platform","depth":5,"bounds":{"left":0.013297873,"top":0.367917,"width":0.027925532,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":4,"bounds":{"left":0.0,"top":0.38946527,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Hey @louis030195 Ill check during my - screenpipe.com","depth":5,"bounds":{"left":0.013297873,"top":0.40063846,"width":0.09790558,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":4,"bounds":{"left":0.0,"top":0.42218676,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub","depth":5,"bounds":{"left":0.013297873,"top":0.43335995,"width":0.22556517,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":4,"bounds":{"left":0.0,"top":0.45490822,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gong Pricing in 2026: Costs, Plans & Is It Worth It?","depth":5,"bounds":{"left":0.013297873,"top":0.4660814,"width":0.08826463,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":4,"bounds":{"left":0.0,"top":0.48762968,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - kovaliklukas@gmail.com - Gmail","depth":5,"bounds":{"left":0.013297873,"top":0.49880287,"width":0.28075132,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"Gitea Official Website","depth":4,"bounds":{"left":0.0,"top":0.5203512,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Gitea Official Website","depth":5,"bounds":{"left":0.013297873,"top":0.53152436,"width":0.03756649,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":4,"bounds":{"left":0.0,"top":0.55307263,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea","depth":5,"bounds":{"left":0.013297873,"top":0.5642458,"width":0.10555186,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"New Tab","depth":4,"bounds":{"left":0.0,"top":0.5857941,"width":0.113696806,"height":0.032721467},"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.013297873,"top":0.5969673,"width":0.014960106,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXRadioButton","text":"MikroTik · CRS304-4XG-IN","depth":4,"bounds":{"left":0.0,"top":0.61851555,"width":0.113696806,"height":0.032721467},"help_text":"","role_description":"tab","subrole":"AXTabButton","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"MikroTik · CRS304-4XG-IN","depth":5,"bounds":{"left":0.013297873,"top":0.62968874,"width":0.046875,"height":0.010774142},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"New Tab","depth":4,"bounds":{"left":0.0028257978,"top":0.6528332,"width":0.108211435,"height":0.025538707},"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.0028257978,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Open Le Chat Mistral (⌃X)","depth":6,"bounds":{"left":0.013796543,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.024933511,"top":0.97007185,"width":0.010638298,"height":0.025538707},"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.036070477,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXCheckBox","text":"Bitwarden","depth":6,"bounds":{"left":0.04720745,"top":0.97007185,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"toggle button","subrole":"AXToggle","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"4","depth":15,"bounds":{"left":0.92769283,"top":0.06264964,"width":0.0019946808,"height":0.008379889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"KB/s","depth":15,"bounds":{"left":0.9296875,"top":0.06304868,"width":0.006150266,"height":0.0075818035},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"923","depth":15,"bounds":{"left":0.92769283,"top":0.07222666,"width":0.005984043,"height":0.008379889},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"B/s","depth":15,"bounds":{"left":0.93367684,"top":0.0726257,"width":0.004155585,"height":0.0075818035},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Files","depth":13,"bounds":{"left":0.13663563,"top":0.1707901,"width":0.009973404,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Control Panel","depth":13,"bounds":{"left":0.12749335,"top":0.2697526,"width":0.02825798,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Storage","depth":13,"bounds":{"left":0.13347739,"top":0.36871508,"width":0.016289894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"App Center","depth":13,"bounds":{"left":0.12982048,"top":0.46767756,"width":0.023603724,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Logs","depth":13,"bounds":{"left":0.13663563,"top":0.5666401,"width":0.009973404,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Support","depth":13,"bounds":{"left":0.13347739,"top":0.66560256,"width":0.016289894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Task Manager","depth":13,"bounds":{"left":0.12699468,"top":0.76456505,"width":0.02925532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Universal Search","depth":13,"bounds":{"left":0.123836435,"top":0.86352754,"width":0.03557181,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Music","depth":13,"bounds":{"left":0.18334441,"top":0.1707901,"width":0.012300532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Cloud Drives","depth":13,"bounds":{"left":0.17619681,"top":0.2697526,"width":0.026595745,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Theater","depth":13,"bounds":{"left":0.18151596,"top":0.36871508,"width":0.015957447,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Photos","depth":13,"bounds":{"left":0.18218085,"top":0.46767756,"width":0.01462766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Online Office","depth":13,"bounds":{"left":0.17603059,"top":0.5666401,"width":0.026928192,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"TextEdit","depth":13,"bounds":{"left":0.18118352,"top":0.66560256,"width":0.01662234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Virtual Machine","depth":13,"bounds":{"left":0.17353724,"top":0.76456505,"width":0.031914894,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Downloads","depth":13,"bounds":{"left":0.17802526,"top":0.86352754,"width":0.022938829,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"DLNA","depth":13,"bounds":{"left":0.23121676,"top":0.1707901,"width":0.012300532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"File Version Explorer","depth":13,"bounds":{"left":0.2159242,"top":0.2697526,"width":0.04288564,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Security","depth":13,"bounds":{"left":0.22888963,"top":0.36871508,"width":0.016954787,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Jellyfin-HT","depth":13,"bounds":{"left":0.22639628,"top":0.46767756,"width":0.021941489,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"SAN Manager","depth":13,"bounds":{"left":0.22273937,"top":0.5666401,"width":0.02925532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Vault","depth":13,"bounds":{"left":0.2322141,"top":0.66560256,"width":0.010305851,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Snapshot","depth":13,"bounds":{"left":0.22755983,"top":0.76456505,"width":0.019614361,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Comics","depth":13,"bounds":{"left":0.22955452,"top":0.86352754,"width":0.015625,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Sync & Backup","depth":13,"bounds":{"left":0.26944813,"top":0.1707901,"width":0.03158245,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Control Panel","depth":10,"bounds":{"left":0.54787236,"top":0.19872306,"width":0.025930852,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"","depth":10,"bounds":{"left":0.7430186,"top":0.19473264,"width":0.007978723,"height":0.01915403},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":11,"bounds":{"left":0.7443484,"top":0.19792499,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":16,"bounds":{"left":0.50797874,"top":0.2434158,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Search","depth":15,"bounds":{"left":0.5152925,"top":0.23703113,"width":0.09042553,"height":0.023942538},"help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"Connection & Access","depth":15,"bounds":{"left":0.36801863,"top":0.2753392,"width":0.044215426,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"User Management","depth":17,"bounds":{"left":0.37084442,"top":0.34357542,"width":0.038231384,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"File Service","depth":17,"bounds":{"left":0.42303857,"top":0.34357542,"width":0.024268618,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Device Connection","depth":17,"bounds":{"left":0.4609375,"top":0.34357542,"width":0.0390625,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Domain/LDAP","depth":17,"bounds":{"left":0.51080453,"top":0.34357542,"width":0.029587766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Terminal","depth":17,"bounds":{"left":0.56200135,"top":0.34357542,"width":0.01761968,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"General","depth":15,"bounds":{"left":0.36801863,"top":0.40782124,"width":0.01662234,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Hardware & Power","depth":17,"bounds":{"left":0.37051198,"top":0.47605747,"width":0.038896278,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Time & Language","depth":17,"bounds":{"left":0.4168883,"top":0.47605747,"width":0.03656915,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Network","depth":17,"bounds":{"left":0.47190824,"top":0.47605747,"width":0.016954787,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Security","depth":17,"bounds":{"left":0.517121,"top":0.47605747,"width":0.016954787,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Indexing Service","depth":17,"bounds":{"left":0.55369014,"top":0.47605747,"width":0.034242023,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Service","depth":15,"bounds":{"left":0.36801863,"top":0.53990424,"width":0.015458777,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"About","depth":17,"bounds":{"left":0.38380983,"top":0.60814047,"width":0.012300532,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Update & Restore","depth":17,"bounds":{"left":0.4167221,"top":0.60814047,"width":0.036901597,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXLink","text":"","depth":10,"bounds":{"left":0.7563165,"top":0.22665602,"width":0.007978723,"height":0.01915403},"help_text":"","role_description":"link","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":11,"bounds":{"left":0.75764626,"top":0.22984837,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Files","depth":16,"bounds":{"left":0.5696476,"top":0.23064645,"width":0.008976064,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":21,"bounds":{"left":0.37799203,"top":0.26256984,"width":0.0034906915,"height":0.007980846},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Personal Folder","depth":21,"bounds":{"left":0.38397607,"top":0.2601756,"width":0.037732713,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":21,"bounds":{"left":0.37799203,"top":0.29130086,"width":0.0034906915,"height":0.007980846},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Shared Folder","depth":21,"bounds":{"left":0.38397607,"top":0.28890663,"width":0.033909574,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":21,"bounds":{"left":0.37799203,"top":0.3200319,"width":0.0034906915,"height":0.007980846},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"User Folder","depth":21,"bounds":{"left":0.38397607,"top":0.31763768,"width":0.028424202,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":21,"bounds":{"left":0.37799203,"top":0.34876296,"width":0.0034906915,"height":0.007980846},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Tag","depth":21,"bounds":{"left":0.38397607,"top":0.3463687,"width":0.010472074,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":17,"bounds":{"left":0.3773271,"top":0.82521945,"width":0.0066489363,"height":0.015961692},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Recycle Bin","depth":17,"bounds":{"left":0.38663563,"top":0.82681566,"width":0.024601065,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.4582779,"top":0.26935354,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.46126994,"top":0.27653632,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.46891624,"top":0.26935354,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.47190824,"top":0.27653632,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":18,"bounds":{"left":0.48354387,"top":0.26935354,"width":0.010638298,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":20,"bounds":{"left":0.4865359,"top":0.27653632,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Shared Folder","depth":21,"bounds":{"left":0.501496,"top":0.27573824,"width":0.029587766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Shared Folder","depth":21,"bounds":{"left":0.501496,"top":0.27573824,"width":0.029587766,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":21,"bounds":{"left":0.70013297,"top":0.27334398,"width":0.00731383,"height":0.017956903},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXTextField","text":"Please enter","depth":19,"bounds":{"left":0.71143615,"top":0.27015164,"width":0.04454787,"height":0.023942538},"help_text":"","role_description":"text field","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXButton","text":"","depth":18,"bounds":{"left":0.45794547,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":20,"bounds":{"left":0.46126994,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":18,"bounds":{"left":0.47190824,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":false,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":20,"bounds":{"left":0.47523272,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.68916225,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.6924867,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.703125,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.70644945,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.71708775,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.72041225,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":"","depth":17,"bounds":{"left":0.73105055,"top":0.30367118,"width":0.011303191,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.734375,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXButton","text":" ","depth":17,"bounds":{"left":0.7450133,"top":0.30367118,"width":0.015292553,"height":0.025538707},"help_text":"","role_description":"button","subrole":"AXUnknown","is_enabled":true,"is_focused":false,"is_selected":false},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.74800533,"top":0.31085396,"width":0.004654255,"height":0.011572227},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":19,"bounds":{"left":0.75398934,"top":0.31165203,"width":0.0039893617,"height":0.009577015},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Name","depth":23,"bounds":{"left":0.46459442,"top":0.3471668,"width":0.010970744,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Size","depth":23,"bounds":{"left":0.6278258,"top":0.3471668,"width":0.007978723,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Type","depth":23,"bounds":{"left":0.664395,"top":0.3471668,"width":0.008976064,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"Modification date","depth":23,"bounds":{"left":0.7009641,"top":0.3471668,"width":0.032912236,"height":0.011173184},"help_text":"","role_description":"text","subrole":"AXUnknown"},{"role":"AXStaticText","text":"","depth":20,"bounds":{"left":0.75299203,"top":0.3463687,"width":0.005319149,"height":0.012769354},"help_text":"","role_description":"text","subrole":"AXUnknown"}]...
|
-9175504746210431093
|
5257177690898717455
|
click
|
accessibility
|
NULL
|
DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) DXP4800PLUS-B5F8
Inbox (7) - [EMAIL] - Gmail
(56) Inbox | [EMAIL] | Proton Mail
Welcome back
Welcome back
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Western Digital Red Plus 3.5 6TB 5400rpm 256MB SATA3 (WD60EFPX) от 241,72 € (472,76 лв.) Вътрешен хард диск Western Digital - Pazaruvaj.com
Today's Deals
Today's Deals
architecture - screenpipe docs
architecture - screenpipe docs
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Claude Code works better when you stop treating it like a machine - [EMAIL] - Gmail
Screenpipe — Archive
Screenpipe — Archive
SQLite Web: archive.db
SQLite Web: archive.db
SQLite Web: db.sqlite
SQLite Web: db.sqlite
Claude Platform
Claude Platform
Hey @louis030195 Ill check during my - screenpipe.com
Hey @louis030195 Ill check during my - screenpipe.com
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
GitHub - screenpipe/screenpipe: Run agents that work for you based on what you do. AI finally knows what you are doing · GitHub
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
Gong Pricing in 2026: Costs, Plans & Is It Worth It?
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
GLM 5.1 Thinks Strategically, Data-Center Revolt Intensifies, When Helpful LLMs Turn Unhelpful, Humanoid Robots Get to Work - [EMAIL] - Gmail
Gitea Official Website
Gitea Official Website
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
lakylak/screenpipe - screenpipe - Gitea: Git with a cup of tea
New Tab
New Tab
MikroTik · CRS304-4XG-IN
MikroTik · CRS304-4XG-IN
New Tab
Customize sidebar
Open Le Chat Mistral (⌃X)
Open history (⇧⌘H)
Open bookmarks (⌘B)
Bitwarden
4
KB/s
923
B/s
Files
Control Panel
Storage
App Center
Logs
Support
Task Manager
Universal Search
Music
Cloud Drives
Theater
Photos
Online Office
TextEdit
Virtual Machine
Downloads
DLNA
File Version Explorer
Security
Jellyfin-HT
SAN Manager
Vault
Snapshot
Comics
Sync & Backup
Control Panel
Search
Connection & Access
User Management
File Service
Device Connection
Domain/LDAP
Terminal
General
Hardware & Power
Time & Language
Network
Security
Indexing Service
Service
About
Update & Restore
Files
Personal Folder
Shared Folder
User Folder
Tag
Recycle Bin
Shared Folder
Shared Folder
Please enter
Name
Size
Type
Modification date
...
|
81598
|
|
39411
|
798
|
94
|
2026-04-16T13:38:18.307603+00:00
|
/Users/lukas/.screenpipe/data/data/2026-04-16/1776 /Users/lukas/.screenpipe/data/data/2026-04-16/1776346698307_m1.jpg...
|
iTerm2
|
find
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Last login: Thu Apr 16 15:48:11 on ttys009
Poetry Last login: Thu Apr 16 15:48:11 on ttys009
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;"
Error: in prepare, no such column: timestamp
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite ".schema ocr_text"
CREATE TABLE IF NOT EXISTS "ocr_text" (
frame_id INTEGER NOT NULL,
text TEXT NOT NULL,
text_json TEXT,
app_name TEXT NOT NULL DEFAULT '',
ocr_engine TEXT NOT NULL DEFAULT 'unknown'
, window_name TEXT, focused BOOLEAN DEFAULT FALSE, text_length INTEGER, sync_id TEXT, synced_at DATETIME);
CREATE INDEX idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX idx_ocr_text_frame_app_window ON ocr_text(frame_id, app_name, window_name);
CREATE INDEX idx_ocr_text_length ON ocr_text (text_length);
CREATE INDEX idx_ocr_text_sync_id ON ocr_text(sync_id) WHERE sync_id IS NOT NULL;
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name FROM ocr_text LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status
zsh: command not found: st-status
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status
zsh: command not found: st-status
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-16T16:37:14+03:00",
"uptime": 2866.983892584,
"fps": 0.[CREDIT_CARD],
"frames": 1762
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-16T16:37:44+03:00",
"uptime": 2894.494524792,
"fps": 0.612196701297038,
"frames": 1772
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name FROM ocr_text LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ pgrep -la screenpipe
10874 screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ls -lh ~/.screenpipe/db.sqlite
# Check if there are other DB files
find ~ -name "db.sqlite" 2>/dev/null
-rw-r--r-- 1 lukas staff 2.6G 16 Apr 16:36 /Users/lukas/.screenpipe/db.sqlite
zsh: command not found: #
/Users/lukas/.screenpipe/db.sqlite
DOCKER
Close Tab
DEV (-zsh)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
find
Close Tab
⌥⌘1
find...
|
[{"role":"AXTextArea","text [{"role":"AXTextArea","text":"Last login: Thu Apr 16 15:48:11 on ttys009\n\nPoetry could not find a pyproject.toml file in /Users/lukas or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;\"\nError: in prepare, no such column: timestamp\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \".schema ocr_text\"\nCREATE TABLE IF NOT EXISTS \"ocr_text\" (\n frame_id INTEGER NOT NULL,\n text TEXT NOT NULL,\n text_json TEXT,\n app_name TEXT NOT NULL DEFAULT '',\n ocr_engine TEXT NOT NULL DEFAULT 'unknown'\n, window_name TEXT, focused BOOLEAN DEFAULT FALSE, text_length INTEGER, sync_id TEXT, synced_at DATETIME);\nCREATE INDEX idx_ocr_text_frame_id ON ocr_text(frame_id);\nCREATE INDEX idx_ocr_text_frame_app_window ON ocr_text(frame_id, app_name, window_name);\nCREATE INDEX idx_ocr_text_length ON ocr_text (text_length);\nCREATE INDEX idx_ocr_text_sync_id ON ocr_text(sync_id) WHERE sync_id IS NOT NULL;\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name FROM ocr_text LIMIT 50;\"\n\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status\nzsh: command not found: st-status\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status\nzsh: command not found: st-status\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-16T16:37:14+03:00\",\n \"uptime\": 2866.983892584,\n \"fps\": 0.6145831528937951,\n \"frames\": 1762\n}\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-16T16:37:44+03:00\",\n \"uptime\": 2894.494524792,\n \"fps\": 0.612196701297038,\n \"frames\": 1772\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name FROM ocr_text LIMIT 50;\"\n\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ pgrep -la screenpipe\n10874 screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ls -lh ~/.screenpipe/db.sqlite\n# Check if there are other DB files\nfind ~ -name \"db.sqlite\" 2>/dev/null\n-rw-r--r-- 1 lukas staff 2.6G 16 Apr 16:36 /Users/lukas/.screenpipe/db.sqlite\nzsh: command not found: #\n/Users/lukas/.screenpipe/db.sqlite","depth":4,"value":"Last login: Thu Apr 16 15:48:11 on ttys009\n\nPoetry could not find a pyproject.toml file in /Users/lukas or its parents\n\nPoetry could not find a pyproject.toml file in /Users/lukas or its parents\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\"\nError: in prepare, no such column: created_at\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;\"\nError: in prepare, no such column: timestamp\n ari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;\n error here ---^\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \".schema ocr_text\"\nCREATE TABLE IF NOT EXISTS \"ocr_text\" (\n frame_id INTEGER NOT NULL,\n text TEXT NOT NULL,\n text_json TEXT,\n app_name TEXT NOT NULL DEFAULT '',\n ocr_engine TEXT NOT NULL DEFAULT 'unknown'\n, window_name TEXT, focused BOOLEAN DEFAULT FALSE, text_length INTEGER, sync_id TEXT, synced_at DATETIME);\nCREATE INDEX idx_ocr_text_frame_id ON ocr_text(frame_id);\nCREATE INDEX idx_ocr_text_frame_app_window ON ocr_text(frame_id, app_name, window_name);\nCREATE INDEX idx_ocr_text_length ON ocr_text (text_length);\nCREATE INDEX idx_ocr_text_sync_id ON ocr_text(sync_id) WHERE sync_id IS NOT NULL;\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name FROM ocr_text LIMIT 50;\"\n\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status\nzsh: command not found: st-status\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status\nzsh: command not found: st-status\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-16T16:37:14+03:00\",\n \"uptime\": 2866.983892584,\n \"fps\": 0.6145831528937951,\n \"frames\": 1762\n}\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-16T16:37:44+03:00\",\n \"uptime\": 2894.494524792,\n \"fps\": 0.612196701297038,\n \"frames\": 1772\n}\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name FROM ocr_text LIMIT 50;\"\n\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite \"SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;\"\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ pgrep -la screenpipe\n10874 screenpipe\nlukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ls -lh ~/.screenpipe/db.sqlite\n# Check if there are other DB files\nfind ~ -name \"db.sqlite\" 2>/dev/null\n-rw-r--r-- 1 lukas staff 2.6G 16 Apr 16:36 /Users/lukas/.screenpipe/db.sqlite\nzsh: command not found: #\n/Users/lukas/.screenpipe/db.sqlite","is_focused":true},{"role":"AXRadioButton","text":"DOCKER","depth":2,"bounds":{"left":0.0,"top":0.05888889,"width":0.20069444,"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 (-zsh)","depth":2,"bounds":{"left":0.20069444,"top":0.05888889,"width":0.20034721,"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.2048611,"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.40104166,"top":0.05888889,"width":0.20034721,"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.40520832,"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.6013889,"top":0.05888889,"width":0.20034721,"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.60555553,"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":"find","depth":2,"bounds":{"left":0.8017361,"top":0.05888889,"width":0.19826388,"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.8059028,"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.9736111,"top":0.032222223,"width":0.026388884,"height":0.018888889},"automation_id":"_NS:8","role_description":"text"},{"role":"AXStaticText","text":"find","depth":1,"bounds":{"left":0.49861112,"top":0.033333335,"width":0.020833334,"height":0.017777778},"role_description":"text"}]...
|
-9174460297988561575
|
5324582145953286651
|
visual_change
|
accessibility
|
NULL
|
Last login: Thu Apr 16 15:48:11 on ttys009
Poetry Last login: Thu Apr 16 15:48:11 on ttys009
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;"
Error: in prepare, no such column: created_at
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY created_at DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;"
Error: in prepare, no such column: timestamp
ari%' OR window_name LIKE '%Boosteroid%' ORDER BY timestamp DESC LIMIT 20;
error here ---^
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite ".schema ocr_text"
CREATE TABLE IF NOT EXISTS "ocr_text" (
frame_id INTEGER NOT NULL,
text TEXT NOT NULL,
text_json TEXT,
app_name TEXT NOT NULL DEFAULT '',
ocr_engine TEXT NOT NULL DEFAULT 'unknown'
, window_name TEXT, focused BOOLEAN DEFAULT FALSE, text_length INTEGER, sync_id TEXT, synced_at DATETIME);
CREATE INDEX idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX idx_ocr_text_frame_app_window ON ocr_text(frame_id, app_name, window_name);
CREATE INDEX idx_ocr_text_length ON ocr_text (text_length);
CREATE INDEX idx_ocr_text_sync_id ON ocr_text(sync_id) WHERE sync_id IS NOT NULL;
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE app_name LIKE '%Safari%' OR window_name LIKE '%Boosteroid%' LIMIT 20;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name FROM ocr_text LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status
zsh: command not found: st-status
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ st-status
zsh: command not found: st-status
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-16T16:37:14+03:00",
"uptime": 2866.983892584,
"fps": 0.[CREDIT_CARD],
"frames": 1762
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sp-status
{
"status": "healthy",
"frame_status": "ok",
"audio_status": "disabled",
"last_frame": "2026-04-16T16:37:44+03:00",
"uptime": 2894.494524792,
"fps": 0.612196701297038,
"frames": 1772
}
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name FROM ocr_text LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ sqlite3 ~/.screenpipe/db.sqlite "SELECT DISTINCT app_name, window_name FROM ocr_text WHERE window_name LIKE '%Boosteroid%' OR window_name LIKE '%boosteroid%' OR app_name LIKE '%Boosteroid%' OR app_name LIKE '%Chrome%' OR app_name LIKE '%Firefox%' OR app_name LIKE '%Arc%' OR app_name LIKE '%Brave%' OR app_name LIKE '%Vivaldi%' LIMIT 50;"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ pgrep -la screenpipe
10874 screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ ls -lh ~/.screenpipe/db.sqlite
# Check if there are other DB files
find ~ -name "db.sqlite" 2>/dev/null
-rw-r--r-- 1 lukas staff 2.6G 16 Apr 16:36 /Users/lukas/.screenpipe/db.sqlite
zsh: command not found: #
/Users/lukas/.screenpipe/db.sqlite
DOCKER
Close Tab
DEV (-zsh)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
find
Close Tab
⌥⌘1
find...
|
NULL
|