|
79326
|
2784
|
23
|
2026-05-28T06:25:24.937069+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949524937_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1155377062193321409
|
6685203931303450205
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
79324
|
NULL
|
NULL
|
NULL
|
|
79327
|
2785
|
15
|
2026-05-28T06:25:25.041954+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949525041_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"bounds":{"left":0.6868351,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6984708,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.7077792,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.7194149,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.7293883,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7390292,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7463431,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1155377062193321409
|
6685203931303450205
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79328
|
2784
|
24
|
2026-05-28T06:25:26.019842+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949526019_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1730052295338979747
|
6685203931303450205
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79329
|
2785
|
16
|
2026-05-28T06:25:26.122708+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949526122_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4528724110787610736
|
2604719229101344208
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missProinet vKemelonp© SyncMailbox.phpEinfection ison disTextRelayServiceTest.phpPyyminny.onMAINSTAIMclass Field extends ModelMANiStNAwERtosanemajiminny_storagewulicancas mause RequiresUUIdUse cnunsM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM: README.mdô sonar-proiect propertiesEtest.ovwoe consthwinhchoihsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesqub dic const string TYPE PERLENpercentqubsic const string ipE PriKESTqubdic const staing tpe NuMBERconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowsoes roeAN fiiminovAlocalbostt999909nuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10public const string TYPE DATEnuhllie conet etrion Yyog TYMewsweslitiiminowoesnnehpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':timinoutioeainden& zoho_dev fiminny@localhostyewelpublic const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT#concalo ropontServicos+oc|exv MDatabas,7) Outputtil jiminny.crm.Jayouts1rowy900consoleRidyliminny@loch nostBuuid (uuTD with time-low and tine-high swapped)lS:516mA HSLlocalvoneltoear consouratondcancalotypeD namoN CTAGINGLB created.at# consoleTnastor(undated..atraw rotriouod ctartina tram n 408 ma loysaieiwy17 ma toinhma: 201 maTMockariitconedia PereA console (EU)A console (STAGING]E| AAXAAM DO 00€E 25025,257E 262=268269Em_ 273 vDo jminny021 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipedoive':TRenASTsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJIOTM tasee +1.ncos1:on t id = utean 3oWHERE U.tean_id = 19 and sa.provider = 'pipedrive":SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997,WHERE id = 1116:"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*)select * fron con Sieldi values-275select * fron con fields where tyoe = 'nulti-picklist':SELECT * FROM crn_ Layouts| WHERE Uuid_to_Bin(*7C327871-fc25-4cS6-9a0f-44c5a849d65C') = uuid;SELECT * EROM con Slelde WHFRE 30 = 3012SELECT * EROM con Sfeldi values WHEDE con £5ela 30 = 7912.TO0%L7Thu 28 May 9:25:26TextRelayServiceTesteeendhrner hensewiet+0.can I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nam# eu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lb bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironnantorectly via tinker to verity the header loaic without disoatchino amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(sow:Service=ssvc-soctServicelcontiatainny.ooogle textuser'Ask anuthino (2a1§ AdaptiveQEаA0Mayz87ateo5.hack-onhf-MnGo/onleEvent Based Layout2822-12-15 14:53:852822-12-15 14:53:85CSVyДus.00NU Mniaur Tosme 27226 lITS8 enA...
|
79327
|
NULL
|
NULL
|
NULL
|
|
79330
|
2784
|
25
|
2026-05-28T06:25:27.151374+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949527151_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7650400725798722197
|
5771048316864018365
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
79328
|
NULL
|
NULL
|
NULL
|
|
79333
|
2784
|
27
|
2026-05-28T06:25:32.519854+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949532519_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScripts|ProfilesWindowHe iTerm2ShellEditViewSessionScripts|ProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php 2[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/May/2026:06:24:45+0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_1amp_1| [IP_ADDRESS]/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan'meeting-bot:schedule-bot]... 2s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot › */proc/1/fd/12>&1docker_lamp_12026-05-28 06:25:09 Running ['artisan' dialers:monitor-activities] . 7s DONEdocker_lamp_1/1'l '/usr/local/bin/php' 'artisan' dialers:monitor-activities › '/proc/1/fd2>&1docker_1amp_12026-05-28 06:25:16 Running ['artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_1ZS DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts › '/proc/1/fd/1' 2>&1docker_1amp_12026-05-28 06:25:18 Running ['artisan'mailbox:skip-lists:refresh] . 1s DONEdocker_lamp_1/1'1 '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh> */proc/1/fd2>&1docker_1amp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch:proceS=15]3S DONEdocker_1amp_11• '/usr/local/bin/php' 'artisan'mailbox:batch:process --m'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stalONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' activity:purge-stale > '/&1docker_lamp_112026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:28/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/inde14336 wwwdocker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' mailbox:text-relay:sync › */proc/1/fd/1'2>&1V View in Docker Desktop@ View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|XT4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.***System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)STAGE(-zsh)kas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
-5237792800977126694
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScripts|ProfilesWindowHe iTerm2ShellEditViewSessionScripts|ProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php 2[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/May/2026:06:24:45+0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_1amp_1| [IP_ADDRESS]/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan'meeting-bot:schedule-bot]... 2s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot › */proc/1/fd/12>&1docker_lamp_12026-05-28 06:25:09 Running ['artisan' dialers:monitor-activities] . 7s DONEdocker_lamp_1/1'l '/usr/local/bin/php' 'artisan' dialers:monitor-activities › '/proc/1/fd2>&1docker_1amp_12026-05-28 06:25:16 Running ['artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_1ZS DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts › '/proc/1/fd/1' 2>&1docker_1amp_12026-05-28 06:25:18 Running ['artisan'mailbox:skip-lists:refresh] . 1s DONEdocker_lamp_1/1'1 '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh> */proc/1/fd2>&1docker_1amp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch:proceS=15]3S DONEdocker_1amp_11• '/usr/local/bin/php' 'artisan'mailbox:batch:process --m'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stalONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' activity:purge-stale > '/&1docker_lamp_112026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:28/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/inde14336 wwwdocker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' mailbox:text-relay:sync › */proc/1/fd/1'2>&1V View in Docker Desktop@ View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|XT4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.***System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)STAGE(-zsh)kas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
79332
|
NULL
|
NULL
|
NULL
|
|
79334
|
2785
|
18
|
2026-05-28T06:25:32.621892+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949532621_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-2091 PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missproidetKemelonp© SyncMaibox.phpEinfection ison disTextRelayServiceTest.phpPyyminny.onMANSTAIImclass Field extends ModelMANiStNAwERtosanemajiminny_storagewulicancas mause RequiresUUIdUse cnunsM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM+README.mdô sonar-proiect propertiesEtest.ovwoe consthwinhchoihsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAX_LENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTqubdic const staing tpe NuMBERconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowsoes roeAN fiiminovAlocalbostt999909nuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etatno. vos felpublic const string TYPE DATEnuhllie conet etrion Yyog TYMewsweslitiiminowoesnnehpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':timinovtioesinoen& zoho_dev fiminny@localhostyowelpublic const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT#concalo ropontServicos+oc|exv MDatabas,7) Outputtil jiminny.crm.Jayouts1rowy900consoleRidyliminny@loch nostBuuid (uuTD with time-low and tine-high swapped)lS:516mA HSLlocaltoear consouratondcancalotypeD namoN CTAGINGLB created.at# consoleTnastor(undated..atraw rotriouod ctartina tram n 408 ma loysaieiwy17 ma toinhma: 201 maMockeriitQEаA07c327871-4c25-4c56-9a0f-44cSa849d6ScEvent Based Layout2822-12-15 14:53:852822-12-15 14:53:85custom.loglaravel.logSF (iminny@localhost) xconsole [PROD)# console FulA console (STAGINGTwwAVDО000Tc AutoyDo jminny-247248E25e=251252257=260E261=268- 273select * fron crn_configurations where provider = Olpedrave':UaalalyzyoCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idSd.xt.ouner_id FROM social_accounts saJosn usersu on b.zo= 50.50028010220JOIN teams t 1.n<->1: on t.id = u.tean_idWHERE u.team_id = 19 and sa.provider = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)WHERE 10=16"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc""exotres":779891997select * Fron ern Field valuesselect * from eon fields where tvoe e "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin(*7c327871-fc25-4cS6-9a8f-44cSa849d65c') = uuid:eroatcailcloseconcache sindeychande macten tochange replication filterchack tablechackeue tablecrasta soonsoste functsonace Next Tip00%LXThu 28 May 9:25:32TextRelayServiceTesteeendhrner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nam# eu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lb bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironnentorectly via tinker to verity the header loaic without disoatchino amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(Som: Service=ssvc-soctServicelcontiaminny.google textuser'Ask anuthind (2A1§ AdaptiveCSVyДus.00NM Maur Tosme 2710 liTe8 ens...
|
NULL
|
2097653468777390815
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-2091 PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missproidetKemelonp© SyncMaibox.phpEinfection ison disTextRelayServiceTest.phpPyyminny.onMANSTAIImclass Field extends ModelMANiStNAwERtosanemajiminny_storagewulicancas mause RequiresUUIdUse cnunsM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM+README.mdô sonar-proiect propertiesEtest.ovwoe consthwinhchoihsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAX_LENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTqubdic const staing tpe NuMBERconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowsoes roeAN fiiminovAlocalbostt999909nuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etatno. vos felpublic const string TYPE DATEnuhllie conet etrion Yyog TYMewsweslitiiminowoesnnehpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':timinovtioesinoen& zoho_dev fiminny@localhostyowelpublic const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT#concalo ropontServicos+oc|exv MDatabas,7) Outputtil jiminny.crm.Jayouts1rowy900consoleRidyliminny@loch nostBuuid (uuTD with time-low and tine-high swapped)lS:516mA HSLlocaltoear consouratondcancalotypeD namoN CTAGINGLB created.at# consoleTnastor(undated..atraw rotriouod ctartina tram n 408 ma loysaieiwy17 ma toinhma: 201 maMockeriitQEаA07c327871-4c25-4c56-9a0f-44cSa849d6ScEvent Based Layout2822-12-15 14:53:852822-12-15 14:53:85custom.loglaravel.logSF (iminny@localhost) xconsole [PROD)# console FulA console (STAGINGTwwAVDО000Tc AutoyDo jminny-247248E25e=251252257=260E261=268- 273select * fron crn_configurations where provider = Olpedrave':UaalalyzyoCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idSd.xt.ouner_id FROM social_accounts saJosn usersu on b.zo= 50.50028010220JOIN teams t 1.n<->1: on t.id = u.tean_idWHERE u.team_id = 19 and sa.provider = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)WHERE 10=16"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc""exotres":779891997select * Fron ern Field valuesselect * from eon fields where tvoe e "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin(*7c327871-fc25-4cS6-9a8f-44cSa849d65c') = uuid:eroatcailcloseconcache sindeychande macten tochange replication filterchack tablechackeue tablecrasta soonsoste functsonace Next Tip00%LXThu 28 May 9:25:32TextRelayServiceTesteeendhrner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nam# eu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lb bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironnentorectly via tinker to verity the header loaic without disoatchino amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(Som: Service=ssvc-soctServicelcontiaminny.google textuser'Ask anuthind (2A1§ AdaptiveCSVyДus.00NM Maur Tosme 2710 liTe8 ens...
|
79331
|
NULL
|
NULL
|
NULL
|
|
79335
|
2785
|
19
|
2026-05-28T06:25:35.034988+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949535034_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"22","depth":4,"bounds":{"left":0.68650264,"top":0.123703115,"width":0.009973404,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6984708,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.7077792,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.7194149,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.7293883,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7390292,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7463431,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\n\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\n\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1593422192080104761
|
6685203931303450205
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79336
|
2784
|
28
|
2026-05-28T06:25:34.560226+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949534560_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3150964534923304660
|
-4304507549388960332
|
visual_change
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
iTerm2ShellEditViewSessionScripts|ProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php 2[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/May/2026:06:24:45+0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_1amp_1| [IP_ADDRESS]/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan'meeting-bot:schedule-bot]... 2s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot › */proc/1/fd/12>&1docker_lamp_12026-05-28 06:25:09 Running ['artisan' dialers:monitor-activities] . 7s DONEdocker_lamp_1/1'l '/usr/local/bin/php' 'artisan' dialers:monitor-activities › '/proc/1/fd2>&1docker_1amp_12026-05-28 06:25:16 Running ['artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_1ZS DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:18 Running ['artisan'mailbox:skip-lists:refresh] . 1s DONEdocker_lamp_1/1'1 '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh> */proc/1/fd2>&1docker_1amp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch:process --max-batcheS=15]3S DONEdocker_1amp_11• '/usr/local/bin/php' 'artisan'mailbox:batch:process --max-batches=15 >'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stale]....... 2s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' activity:purge-stale › '/proc/1/fd/1' 2>&1docker_lamp_112026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' mailbox:text-relay:sync › '/proc/1/fd/1'2>&1V View in Docker Desktop@ View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|XT4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79341
|
2784
|
31
|
2026-05-28T06:25:40.756248+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949540756_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php4025.64814336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 RunninONEdocker_lamp_1• '/usr/local/bin/php''atC' 2>&1docker_lamp_12026-05-28 06:25:09 RunnirONEdocker_lamp_1• '/usr/local/bin/php'cl'ar/1'2>&1docker_lamp_12026-05-2806:25:16 Running['artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_1amp_12S DONEdocker_lamp_1/1/fd/1'1 '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts > '/proc2>&1docker_1amp_12026-05-28 06:25:18 Running ['artisan' mailbox:skip-lists:refresh] . 1s DONEdocker_lamp_1 | / '/usr/local/bin/php' 'artisan' mailbox:skip-lists:refresh › */proc/1/fd2>&1docker_lamp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch: process--max-batcheS=15]3S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'mailbox:batch:process --max-batches=15>'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stale]....... <S DONEdocker_lamp_11 , '/usr/local/bin/php' 'artisan' activity:purge-stale > '/proc/1/fd/1' 2>docker_1amp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_1amp_11 Relayed 0 message(s).5S DONE"/usr/local/bin/php' "artisan'mailbox: text-relay:sync › */proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notification][IP_ADDRESS] -hp28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6 wwwdocker_lamp_1 |7s DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1DOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)XIPROD (ssh)S[URL_WITH_CREDENTIALS] ~ $ [|XT4STAGE (ssh)Run'do-release-upgrade' to upgrade to it.*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)STAGEX T6 FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSIONView in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
NULL
|
1747408221829493021
|
NULL
|
typing_pause
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php4025.64814336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 RunninONEdocker_lamp_1• '/usr/local/bin/php''atC' 2>&1docker_lamp_12026-05-28 06:25:09 RunnirONEdocker_lamp_1• '/usr/local/bin/php'cl'ar/1'2>&1docker_lamp_12026-05-2806:25:16 Running['artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_1amp_12S DONEdocker_lamp_1/1/fd/1'1 '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts > '/proc2>&1docker_1amp_12026-05-28 06:25:18 Running ['artisan' mailbox:skip-lists:refresh] . 1s DONEdocker_lamp_1 | / '/usr/local/bin/php' 'artisan' mailbox:skip-lists:refresh › */proc/1/fd2>&1docker_lamp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch: process--max-batcheS=15]3S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'mailbox:batch:process --max-batches=15>'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stale]....... <S DONEdocker_lamp_11 , '/usr/local/bin/php' 'artisan' activity:purge-stale > '/proc/1/fd/1' 2>docker_1amp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_1amp_11 Relayed 0 message(s).5S DONE"/usr/local/bin/php' "artisan'mailbox: text-relay:sync › */proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notification][IP_ADDRESS] -hp28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6 wwwdocker_lamp_1 |7s DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1DOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)XIPROD (ssh)S[URL_WITH_CREDENTIALS] ~ $ [|XT4STAGE (ssh)Run'do-release-upgrade' to upgrade to it.*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)STAGEX T6 FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSIONView in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
79339
|
NULL
|
NULL
|
NULL
|
|
79342
|
2784
|
32
|
2026-05-28T06:25:42.536742+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949542536_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"}]...
|
5424929457992566318
|
-8780512845026360894
|
visual_change
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)public/index.php 4025.64814336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan'meeting-bot:schedule-bot]... 2s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'meeting-bot: schedule-bot › */proc/1/fd/1' 2>&1docker_lamp_1ONE2026-05-28 06:25:09 Running ['artisan'dialers:monitor-activities] . 7s Ddocker_lamp_1l '/usr/local/bin/php' 'artisan' dialers:monitor-activities › '/proc/1/fd/1'2>&1docker_lamp_12026-05-2806:25:16 RunningC'artisan'jiminny:monitor-social-accounts][IP_ADDRESS]/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_1amp_12S DONEdocker_lamp_1/1/fd/1'1 '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts > '/proc2>81docker_1amp_12026-05-28 06:25:18 Running ['artisan'mailbox:skip-lists:refresh]. 1s DONEdocker_lamp_1 | / '/usr/local/bin/php' 'artisan' mailbox:skip-lists:refresh › */proc/1/fd2>&1docker_lamp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch: process--max-batches=15]3S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'mailbox:batch:process --max-batches=15 >'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 Running ['artisan' activity:purge-stale]....... <S DONEdocker_lamp_11 , '/usr/local/bin/php' 'artisan' activity:purge-stale > '/proc/1/fd/1' 2>docker_1amp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_1amp_11 Relayed 0 message(s).5S DONE"/usr/local/bin/php' "artisan'mailbox: text-relay:sync › */proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notification][IP_ADDRESS] -hp28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6 wwwdocker_lamp_1 |7s DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1DOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|XT4STAGE (ssh)Run'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)X T6 FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSIONView in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79343
|
2785
|
22
|
2026-05-28T06:25:43.014139+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949543014_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4060176888399009113
|
-9212323791225028208
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
rnpstomViewNeWENNCFV faVsco.|s ~$ JY-20915-fix-missEinfection ison distMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soMs README.mdô sonar-proiect propertiesEtest.ovwo on teo Mractom-xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbosttAHS.Jlocal jiminny@localhosttiminoutioeainden& zoho_dev fiminny@localhostServicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocKelucioRurToolWindowKemelonp© SyncMailbox.phpMockeriitTextRelayServiceTest.phpphp fiminny.phgclass Field extends Modeluse RequiresUUIduse Enunswoe consthwinhchoihsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAX_LENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTqubdic const staing tpe NuMBERnuhite conet sranewpr wieeshnhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEshone102public const string TYPE DATE"date"public const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAG= "lead':Beehttrotatllim nny com thwottteW 1row vG00Tx Auto#QEAA®Did(Duuid (UUID with time-low and time-high swapped)2A707921 EAO5.LAGK OOOG NIAGORIONAG)AD cra configuration idtypdcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85nluadotaadt2002.40.16 1HISZIO6custom.logaraveliosSF (iminny@localhost) x HS.Jocal (jminny@alocalhost)& console [PROD# console FulA console (STAGINGTwwAVDe00Pavaroundvis where provider = 'pipednive':=2501 = t.ouner_id THEN • (owner)' ELSE ** END) AS user_idMunteshJoesnu.tean_idwider = 'pipednive':THERE 1d = 1116Do jminny022 A1 A18 V2 Y6 AОсттВаВКоКИс УЛНАлоав теАнКАди ОнамиСУса иКиСКОБО УЙ шАСО САР ЛУЛЕОтЬ МУшеНРУшСУВ РАдАдЯ ВазеКошКеОУСЕЕаОеЬе113:[TELEGRAM_TOKEN]b2bfc*.=270—274=7751BARJ-L2TNK2yuuuaLqifzhwb9crUNKtpk4FL09rgnXqp_6AEghohdgVainvlcHEvnpvSEAAAAfJB8Bgkghk159w3BBwagozBTAgEAH5g6e5g6S10300EHATAев5034113:[TELEGRAM_TOKEN]b2bfc*tyoes "oula-oickuistuuid to bin(+7c327871-f025-4056-9a8f-44c5a849d65c') = uuhd)LES AHERE crm_layout_id = SELECT * FROM crm_field_valUes AHERE Cr_field_1d = SELECT * FROM crm_fields WHERE 10 = 3814;:31id = 3014;TOOУ L7Thu 28 May 9:25:42TextRelayServiceTesteeendhaer henseict+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.json (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXT HOSTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nameeu or us3. Run the svnc manualiv vin tinker tinside docker 1aeo 1%b bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and a spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironntioh.ssve a new class extends Uiminny Services af extRe aiSerice oubllie tunctionconct ruct"Ask amthine (+coda tcdaotvCSVV4+.002eC lITe ehensz...
|
79340
|
NULL
|
NULL
|
NULL
|
|
79344
|
2784
|
33
|
2026-05-28T06:25:51.487227+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949551487_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"22","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"}]...
|
-5569356681239778784
|
5771048317937760189
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2...
|
79342
|
NULL
|
NULL
|
NULL
|
|
79345
|
2785
|
23
|
2026-05-28T06:25:51.588969+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949551588_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"22","depth":4,"bounds":{"left":0.68650264,"top":0.123703115,"width":0.009973404,"height":0.015163607},"on_screen":true,"role_description":"text"}]...
|
2707108135845992017
|
5771013132491929533
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79346
|
2785
|
24
|
2026-05-28T06:25:52.260432+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949552260_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rnpstomViewNeWENNCFV faVsco.s ~$ JY-20915-fix-miss rnpstomViewNeWENNCFV faVsco.s ~$ JY-20915-fix-missEinfection ison disMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml18 raw.sal.query.solMs README.mdô sonar-proiect propertiesEtest.ovSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbosttAHS.Jlocal jiminny@localhosttiminovtioesinoen& zoho_dev fiminny@localhostServicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocKelucioRurToolWindowKemelonp© SyncMailbox.phpTMockariitTextRelayServiceTest.phpphp fiminny.phgclass Field extends Modeluse RequiresUUIduse Enunsoublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedSussoerqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTqubdic const staing tpe NuMBERnuhite conet sranewpr wieesh="cunsaney"nhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etatno. vos felshone102public const string TYPE DATE• "date',public const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAG= "lead':Meouttrttthiminnw com.thwotteW 1row vG00Tx Auto#QEAA®Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAOGLASK.OO0GHIAGORZONAG)AD cra configuration idN tyodcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85updated at2002.40.16 1HISZIO6SF (iminny@localhost) x HS.Jocal jminny@alocalhostconedia PereA console (EU)A console (STAGING)249252269=270Do jminny022 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipedoive':SELECTsa.*,t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.tean_idWHERE U.tean_id = 19 and sa.provider = 'pipedrive":SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997,WHERE id = 1116:"provider_user_token": "v1u:AQI8AНj-LzTNK2yuuUaLgifzh#b9crUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnpvSEAAAAfjß88gkqhkі69»®BB"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*)select * fron con Sieldi values-273 v-274=775select * fron con fields where tvoe = 'nulti-picklist':fhw thcomaiatwindeurSPLECT * FRON con layouts WHERE uufd to bin(-7c327871-fcSELECT + EPOMeanavout ent tes whsts ehet awouteinleSELECT * FROM crn_fields WHERE id = 3014;SELECT * EROM cnn £4eld valuee WHEDE con £4e1a 30 = 7912.uusdhTOOУ L7Thu 28 May 9:25:51TextRelayServiceTestner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manualiv vin tinker tinside docker 1aeo 1%b bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironntioh.ssve a new class extends Oiminny Services Mar extRe lanSeryce oubiilie tuncttonconct ruct"Ask amthine (+coda tcAhntis• oCSVV21+00GIIM: NA: ONMIhNANNSMNold Tosma 27A57 lITE eens...
|
NULL
|
-2003277668595064598
|
NULL
|
click
|
ocr
|
NULL
|
rnpstomViewNeWENNCFV faVsco.s ~$ JY-20915-fix-miss rnpstomViewNeWENNCFV faVsco.s ~$ JY-20915-fix-missEinfection ison disMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml18 raw.sal.query.solMs README.mdô sonar-proiect propertiesEtest.ovSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbosttAHS.Jlocal jiminny@localhosttiminovtioesinoen& zoho_dev fiminny@localhostServicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocKelucioRurToolWindowKemelonp© SyncMailbox.phpTMockariitTextRelayServiceTest.phpphp fiminny.phgclass Field extends Modeluse RequiresUUIduse Enunsoublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedSussoerqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTqubdic const staing tpe NuMBERnuhite conet sranewpr wieesh="cunsaney"nhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etatno. vos felshone102public const string TYPE DATE• "date',public const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAG= "lead':Meouttrttthiminnw com.thwotteW 1row vG00Tx Auto#QEAA®Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAOGLASK.OO0GHIAGORZONAG)AD cra configuration idN tyodcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85updated at2002.40.16 1HISZIO6SF (iminny@localhost) x HS.Jocal jminny@alocalhostconedia PereA console (EU)A console (STAGING)249252269=270Do jminny022 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipedoive':SELECTsa.*,t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.tean_idWHERE U.tean_id = 19 and sa.provider = 'pipedrive":SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997,WHERE id = 1116:"provider_user_token": "v1u:AQI8AНj-LzTNK2yuuUaLgifzh#b9crUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnpvSEAAAAfjß88gkqhkі69»®BB"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*)select * fron con Sieldi values-273 v-274=775select * fron con fields where tvoe = 'nulti-picklist':fhw thcomaiatwindeurSPLECT * FRON con layouts WHERE uufd to bin(-7c327871-fcSELECT + EPOMeanavout ent tes whsts ehet awouteinleSELECT * FROM crn_fields WHERE id = 3014;SELECT * EROM cnn £4eld valuee WHEDE con £4e1a 30 = 7912.uusdhTOOУ L7Thu 28 May 9:25:51TextRelayServiceTestner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manualiv vin tinker tinside docker 1aeo 1%b bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironntioh.ssve a new class extends Oiminny Services Mar extRe lanSeryce oubiilie tuncttonconct ruct"Ask amthine (+coda tcAhntis• oCSVV21+00GIIM: NA: ONMIhNANNSMNold Tosma 27A57 lITE eens...
|
79345
|
NULL
|
NULL
|
NULL
|
|
79347
|
2784
|
34
|
2026-05-28T06:25:52.611645+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949552611_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"}]...
|
1555331631539779386
|
-6470165102313928254
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴8111DOCKER (docker-compose)docker_lamp_1DEV (docker)₴2-zsh8832026-05-28 06:25:23 Running ['artisan'activity:purge-stale]docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:purge-stale › */proc/1/fd/1' 2>docker_lamp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_lamp_1message(s).'/usr/local/bin/php' 'artisan' mailbox:text-relay:sync > '/proc/1/fd/1'2026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notificatio28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6docker_lamp_17S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:pre-meeting-notification> '/proc/1/fd/1' 2>&1docker_lamp_1 /2026-05-28 06:25:38 Running ['artisan' conference:monitor:start] ….. 4s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' conference:monitor:start > */proc/1/fd/1• 2>81docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php"500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_15sDONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' conference:monitor:end › */proc/1/fd/1'2>&1docker_lamp_112026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens]. 3s DONEdocker_lamp_11 t '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens > */proc/1/fd/1' 2>81docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan' conference:pre-meeting-reminder] in background11.16ms DONEdocker_1amp_1• ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder > '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish"framework/schedule-805efb16Dee8d9da02e60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in backgrounddocker_lamp_1• ('/usr/local/bin/php' 'artisan' hubspot:journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish"framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &DOCKER (docker-compose)screenpipe"O ₴4-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)t6FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [FRONTENDX t7EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSIONV View in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79348
|
2785
|
25
|
2026-05-28T06:25:55.546515+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949555546_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-5744601774820691094
|
5807077113882982333
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79349
|
2784
|
35
|
2026-05-28T06:25:55.658092+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949555658_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 28;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"22","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 28;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 28;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
5345915832764569086
|
6685203931387336285
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
22
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 28;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project...
|
79347
|
NULL
|
NULL
|
NULL
|
|
79350
|
2784
|
36
|
2026-05-28T06:25:56.365351+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949556365_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-7635200922161528077
|
-4598385934329243181
|
typing_pause
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴8111DOCKER (docker-compose)docker_lamp_1DEV (docker)₴2-zsh8832026-05-28 06:25:23 Running ['artisan'activity:purge-stale]docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:purge-stale › */proc/1/fd/1' 2>docker_lamp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_lamp_1message(s).'/usr/local/bin/php' 'artisan' mailbox:text-relay:sync > '/proc/1/fd/1'2026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notificatio28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6docker_lamp_17S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:pre-meeting-notification> '/proc/1/fd/1' 2>&1docker_lamp_1 /2026-05-28 06:25:38 Running ['artisan' conference:monitor:start] ….. 4s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' conference:monitor:start > */proc/1/fd/1• 2>81docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php"500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_15sDONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' conference:monitor:end › */proc/1/fd/1'2>&1docker_lamp_112026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens]. 3s DONEdocker_lamp_11 t '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens > */proc/1/fd/1' 2>81docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan' conference:pre-meeting-reminder] in background11.16ms DONEdocker_1amp_1• ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder > '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish"framework/schedule-805efb16Dee8d9da02e60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in backgrounddocker_lamp_1• ('/usr/local/bin/php' 'artisan' hubspot:journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish"framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &DOCKER (docker-compose)screenpipe"-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)t6FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [FRONTENDX t7EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSIONV View in Docker Desktop• View ConfigL View Logsw Enable Watchd Detach...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79351
|
2785
|
26
|
2026-05-28T06:25:56.695304+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949556695_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rnpstomViewNeWENNCFV faVsco.|s ~$ JY-20915-fix-mis rnpstomViewNeWENNCFV faVsco.|s ~$ JY-20915-fix-missEinfection ison distMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml1% raw.salquery.salMs README.mdô sonar-proiect propertiesEtest.ovSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbosttAHS.Jlocal jiminny@localhosttiminovtioesinoen& zoho_dev jiminny@localhost)Servicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocKelucioRurToolWindowKemelonie© SyncMailbox.phpTextRelayServiceTest.phpphp fiminny.phgclass Field extends Modeluse RequiresUUIduse Enunswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIIPICKLIST = "nuLti-pickList"ENot vet supportedSussoerqub dic const string TYPE PERLENpercentqubsic const string ipE PriKESTqubdic const staing tpe NuMBERnuhite conet sranewpr wieeshnhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10shone102public const string TYPE DATE• "date',public const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAG= "lead"Beehttrotatllim nny com thwottteW 1row vG00Tx Auto1Q08A6Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAOGLASK.OO0GHIAGORZONAG)AD cra configuration idtypdcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85updated at2002.40.16 1HISZIO6TMockariitSF (iminny@localhost)conedaereA console (EU)console (STAGINGE| AAXAAM DOO0€Do jminny248249≥250252257=270022 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = Oipedrave':SELEC)TRenASTCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.tean_icWHERE u.tean_id = 19 and sa.provider = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997,WHERE id = 1116:"provider_user_token": "v1u:AQI8AНj-LzTNK2yuuUaLgifzh#b9crUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnpvSEAAAAfjß88gkqhkі69»®BB"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*)select * Fron ern Field values_273 ~—274=775select * from eon fields where tvoe = "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a8f-44C5a849d65c') = uuid;crn_layout_entities WHERE crn_layout_1d = 284SELECT * FROM crn_fields WHERE id = 3014;TOOУ L7Thu 28 May 9:25:56TextRelayServiceTestaer henseict+0.can I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lb bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironntioh.ssve a new class extends Oiminny Services Mar extRe lanSeryce oubiilie tuncttonconct ruct"Ask amthine (+coda tcdaotv• oCSVV21+00Mndaur Tosme 27ke0 liTeensd...
|
NULL
|
1234158463156029466
|
NULL
|
typing_pause
|
ocr
|
NULL
|
rnpstomViewNeWENNCFV faVsco.|s ~$ JY-20915-fix-mis rnpstomViewNeWENNCFV faVsco.|s ~$ JY-20915-fix-missEinfection ison distMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml1% raw.salquery.salMs README.mdô sonar-proiect propertiesEtest.ovSUn tieo aciam-xmiis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbosttAHS.Jlocal jiminny@localhosttiminovtioesinoen& zoho_dev jiminny@localhost)Servicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocKelucioRurToolWindowKemelonie© SyncMailbox.phpTextRelayServiceTest.phpphp fiminny.phgclass Field extends Modeluse RequiresUUIduse Enunswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIIPICKLIST = "nuLti-pickList"ENot vet supportedSussoerqub dic const string TYPE PERLENpercentqubsic const string ipE PriKESTqubdic const staing tpe NuMBERnuhite conet sranewpr wieeshnhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10shone102public const string TYPE DATE• "date',public const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAG= "lead"Beehttrotatllim nny com thwottteW 1row vG00Tx Auto1Q08A6Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAOGLASK.OO0GHIAGORZONAG)AD cra configuration idtypdcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85updated at2002.40.16 1HISZIO6TMockariitSF (iminny@localhost)conedaereA console (EU)console (STAGINGE| AAXAAM DOO0€Do jminny248249≥250252257=270022 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = Oipedrave':SELEC)TRenASTCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJOIN teams t 1.n<->1: on t.id = u.tean_icWHERE u.tean_id = 19 and sa.provider = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997,WHERE id = 1116:"provider_user_token": "v1u:AQI8AНj-LzTNK2yuuUaLgifzh#b9crUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnpvSEAAAAfjß88gkqhkі69»®BB"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*)select * Fron ern Field values_273 ~—274=775select * from eon fields where tvoe = "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a8f-44C5a849d65c') = uuid;crn_layout_entities WHERE crn_layout_1d = 284SELECT * FROM crn_fields WHERE id = 3014;TOOУ L7Thu 28 May 9:25:56TextRelayServiceTestaer henseict+0.can I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lb bashaegdocker exec -it docker_lamp_1 php artisan tinkeapp(\Jiminny\Services\Ma1l\TextRelayService::class)-sync():Caveat: The service reads from Gmail history and e spatches lobs to the queuc. lt you don't want it to actualnsend SMS, make sure QUEUE_CONNECTICN»sync is not set (or use a test queue), or just call isForCurrentEnvironntioh.ssve a new class extends Oiminny Services Mar extRe lanSeryce oubiilie tuncttonconct ruct"Ask amthine (+coda tcdaotv• oCSVV21+00Mndaur Tosme 27ke0 liTeensd...
|
79348
|
NULL
|
NULL
|
NULL
|
|
79352
|
2784
|
37
|
2026-05-28T06:25:59.593989+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949559593_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴8111DOCKER (docker-compose)docker_lamp_1DEV (docker)₴2-zsh8832026-05-28 06:25:23 Running ['artisan'activity:purge-stale]docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:purge-stale › */proc/1/fd/1' 2>docker_lamp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_lamp_1message(s).'/usr/local/bin/php' 'artisan' mailbox:text-relay:sync > '/proc/1/fd/1'2026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notificatio28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6docker_lamp_17S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:pre-meeting-notification> '/proc/1/fd/1' 2>&1docker_lamp_1 /2026-05-28 06:25:38 Running ['artisan' conference:monitor:start] ….. 4s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' conference:monitor:start > */proc/1/fd/1• 2>81docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php"500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_15sDONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' conference:monitor:end › */proc/1/fd/1'2>&1docker_lamp_112026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens]. 3s DONEdocker_lamp_11 t '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens > */proc/1/fd/1' 2>81docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan' conference:pre-meeting-reminder] in background11.16ms DONEdocker_1amp_1• ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder > '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish"framework/schedule-805efb16Dee8d9da02e60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in backgrounddocker_lamp_1• ('/usr/local/bin/php' 'artisan' hubspot:journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish"framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &DOCKER (docker-compose)screenpipe"84-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)t6FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [FRONTENDX t7EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSIONV View in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
NULL
|
894222942202211750
|
NULL
|
typing_pause
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴8111DOCKER (docker-compose)docker_lamp_1DEV (docker)₴2-zsh8832026-05-28 06:25:23 Running ['artisan'activity:purge-stale]docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:purge-stale › */proc/1/fd/1' 2>docker_lamp_12026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22 +0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.316docker_lamp_1docker_lamp_1docker_lamp_1message(s).'/usr/local/bin/php' 'artisan' mailbox:text-relay:sync > '/proc/1/fd/1'2026-05-28 06:25:31 Running ['artisan'conference:pre-meeting-notificatio28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6docker_lamp_17S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:pre-meeting-notification> '/proc/1/fd/1' 2>&1docker_lamp_1 /2026-05-28 06:25:38 Running ['artisan' conference:monitor:start] ….. 4s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' conference:monitor:start > */proc/1/fd/1• 2>81docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php"500 /home/jiminny/public/index.php 6[PHONE]6 wwwdocker_lamp_15sDONEdocker_lamp_1l '/usr/local/bin/php' 'artisan' conference:monitor:end › */proc/1/fd/1'2>&1docker_lamp_112026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens]. 3s DONEdocker_lamp_11 t '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens > */proc/1/fd/1' 2>81docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan' conference:pre-meeting-reminder] in background11.16ms DONEdocker_1amp_1• ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder > '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish"framework/schedule-805efb16Dee8d9da02e60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in backgrounddocker_lamp_1• ('/usr/local/bin/php' 'artisan' hubspot:journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish"framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &DOCKER (docker-compose)screenpipe"84-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGE*** System restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |XIT5QA (-zsh)t6FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [FRONTENDX t7EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSIONV View in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
79350
|
NULL
|
NULL
|
NULL
|
|
79353
|
2784
|
38
|
2026-05-28T06:26:02.523008+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949562523_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)ffmpeg0 84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
7783649923777043049
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)ffmpeg0 84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79354
|
2785
|
27
|
2026-05-28T06:26:02.627426+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949562627_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rnpstomEV faVsco,ls ~View$2 JY-20915-fix-missCoocR rnpstomEV faVsco,ls ~View$2 JY-20915-fix-missCoocRurTOOI-Window& DockerfileE custom.logA console (STAGING)E laravellog4 SF jiminny@localhost) x 4 HSJocal ([iminny@localhost)A console [PROD]A console (EU]infection.json.distMENSTAmM:INTERNAL_WEBHOOK_SETUP.mdE'jiminny_storageM:licenses.mdM MakefileO package-lock.jsonE phpstan.neon.distE phpstan-baseline.neon<Bphpunit.xmlT% raw.sal.query.soMIREADME.md@ sonar-project.propertiesE test.pywo on teo Mractom-xmlvetur.config.isMEWEBHOOK_FILTERING_JMPLEMENTAT> h Extemal Librariesv E Scratches and Consoles~ E Database Consoles© SyneMailbox.php© TextRelayServiceTest.phpPyyminny.onclass Field extends ModerE env.productionTwWLAVTc AutoyDo jminny021 41 A18 X2 X8 Apublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_ LENGTH = 255;public const int DESCRIPTION_MAX_LENGTH = 191;public const string TYPE_MULTAPICKLISI = 'nulti-picklist':// Not yet supported248-250- 251252253=254select * fron crn_configurations where provider = 'Ripedcive':public const string TYPE_PERCENTSELECTCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE "* END) AS user_id,U.chsst,Sd.xt.ouner_id FROM social_accounts saJosn usensu on b.zo= s0.5002001ez20JOIN teams t 1.n<->1: on t.id = u.tean_idWHERE u.tean_id = 19 and sa.provider = 'Rigedeive":public const string TYPE_PICKLISTpublic const string TYPE_NUMBERoublaic const stoing TYPE CURRENCYpublic const string TYPE_800LEANE=259SELECT * FROM social_accounts WHERE id = 1116;UPDATE social_accounts SET provider_user_token = 'vÎu:AQIBAHj-LzTNK2yuuuaLq¿fzhWb9CrUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnp\provider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee97Sf6844&46b6b2bfc',public const string TYPE_TEXTAREAWHERE id = 1116;console iauDEALRISKS IEUDTEUEUTEUvA jiminny@localhostA console (jiminny@localhost)I (jiminny@localhost)AHS.Jlocal jiminny@localhost4SFjiminny@localhost)4 zoho_dev ([iminny@localhost)$8public const string TYPE_DATEpublic const string TYPE_TIMEpublic const string TYPE_DATETIMEpublic const string TYPE_UNSUPPORTED = 'unsupported" :public const string OBJECT_LEADpublic const string OBJECT_ACCOUNT= 'account':public const string OBJECT_CONTACT='contact';public const string OBJECT_OPPORTUNITY= 'opportunity":267269=270271_272—273-274 v=775"provider_user_token": "v1u:AQ[BAHJ-LzTNK2yuvuaLq¿fzh#Ъ9crUNKTpk«FLQ9гjnXqP_6АЕQhОh0QVa1nvNCHEvпpvSEAAAAfjB8Bgkqhki69»ЄBBw"provider_refresh_token": "5034113:19SSS731:87c14258f8c813d02767ee975f6844d46b6b2bfc*,"exotres":7989199select * Fron ern Field valuesselect * fron eon fields where twoe = "nultcoickuistesMLECT * FROM crn_Layouts WHERE Uwid_to_bin(*7C327871-fc25-4c56-9a0f-44c5a849d65c*) = uuid;crn_layout_entities WHERE crn_layout_id = 282SELECT * FROM Crn_fields WHERE 1d = 3014;SELECT * FRON crn_field_values WHERE crm_field_1d = 3814+,o, cB DatabaseV AEUconsoleviminnweloca nost4 SF 1 5 749 гAHSwlocelV A PRODA consoleV A STAGINGconsolaTnlockerF OutputmW 9rows sBid Yjiminny.crm.Jayout_entities x500#QEAA®wvid (UUIO with tine-Low and tine-high swapped) Ycrn_ layout_id Y932 039fcbe4-244а-49ff-9a83-256bS3c97006933 54415f8f-9f04-435d-9b6a-2fa0e178Ce61934 002c9de1-4deS-4bb9-9897-15221485a95e935 da3f8bdS-639a-4263-a8e3-c90a015f48eb036.08805666-a87h-4489-a678-91774801111746937 496726ba-deb0-489f-8651-229d77fa8785938 755bSf1d-dfbf-4783-a45e-Bcf7359312c11790 c2055646-f552-46b1-8689-9200F156cc3d1789 33579bSf-6b86-4a8a-aBec-5363ebe861b2IR parent_entity_id y1idcontieldd282282282282282<null»<null»932932OKy932282282932( Label 7@description &<null> activity-sumnaryActivity Sunnary<null> follow-upNext Steps….1879 <null>1880 <null><nutl»1882 <nutl1RR2 coulns«null1885 <null>1943 Location1984 OutcomeCall OutcomeI default_value Y<null»<null»<null><null>null»<null»<null><null>Dis_nandatory Ytmuc totriovod ctortina tram in , 222100%LXThu 28 May 9:26:02U TextRelayServiceTest~Cascaderner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a few things you'd need in place:1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE_TEXT_RELAY_TOPIC=DEPLOY _REGION=the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com* eu or us3. Run the sync manually via tinker (inside docker_lanp_1):eossttdocker exec -it docker_lamp_1 php artisan tinker• 0app(\Jininny\ServicesVMail\TextRelayService::class)->sync();Caveat: The service reads from Gmail history and a spatches lobs to the queuc. lt you don't want it to actuallysend SMS, make sure QUEUE_CONNECTICN-sync is not set (or use a test queue), or just call isForCurrentEnvironmentorectly via tinker to verity the header loaic without disoatchino amvthinotioh.Ssve = new class extends \Jiminny\ServicesVa1l\TextRelayService ( public functionconstructtAsk amthine (+y codacuhntive• oDis,visible YD read_onlyD sequenceCSVV2u→.0created_at V@updated._at0 2022-12-15 14:53:052022-12-15 141 2022-12-15 14:53:052022-12-15 148 2022-12-15 14:53:052022-12-15 141 2822-12-15 14:53:052022-12-15 147 2822-12015 14:53:892822-10-153 2822-12-15 14.53:094 2822-12-15 14:53:056 2823-02-15 17:02:50S 2023-02-15 17:02:342022-12-15 112923-92-15 12023-02-15 1:N Mnhaur Tosme 27A80 lITE8 ensao...
|
NULL
|
-7356392643743124490
|
NULL
|
click
|
ocr
|
NULL
|
rnpstomEV faVsco,ls ~View$2 JY-20915-fix-missCoocR rnpstomEV faVsco,ls ~View$2 JY-20915-fix-missCoocRurTOOI-Window& DockerfileE custom.logA console (STAGING)E laravellog4 SF jiminny@localhost) x 4 HSJocal ([iminny@localhost)A console [PROD]A console (EU]infection.json.distMENSTAmM:INTERNAL_WEBHOOK_SETUP.mdE'jiminny_storageM:licenses.mdM MakefileO package-lock.jsonE phpstan.neon.distE phpstan-baseline.neon<Bphpunit.xmlT% raw.sal.query.soMIREADME.md@ sonar-project.propertiesE test.pywo on teo Mractom-xmlvetur.config.isMEWEBHOOK_FILTERING_JMPLEMENTAT> h Extemal Librariesv E Scratches and Consoles~ E Database Consoles© SyneMailbox.php© TextRelayServiceTest.phpPyyminny.onclass Field extends ModerE env.productionTwWLAVTc AutoyDo jminny021 41 A18 X2 X8 Apublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_ LENGTH = 255;public const int DESCRIPTION_MAX_LENGTH = 191;public const string TYPE_MULTAPICKLISI = 'nulti-picklist':// Not yet supported248-250- 251252253=254select * fron crn_configurations where provider = 'Ripedcive':public const string TYPE_PERCENTSELECTCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE "* END) AS user_id,U.chsst,Sd.xt.ouner_id FROM social_accounts saJosn usensu on b.zo= s0.5002001ez20JOIN teams t 1.n<->1: on t.id = u.tean_idWHERE u.tean_id = 19 and sa.provider = 'Rigedeive":public const string TYPE_PICKLISTpublic const string TYPE_NUMBERoublaic const stoing TYPE CURRENCYpublic const string TYPE_800LEANE=259SELECT * FROM social_accounts WHERE id = 1116;UPDATE social_accounts SET provider_user_token = 'vÎu:AQIBAHj-LzTNK2yuuuaLq¿fzhWb9CrUNKTpk4FLQ9гjnXqp_6AEQhDhDQVa1nv#CHEvnp\provider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee97Sf6844&46b6b2bfc',public const string TYPE_TEXTAREAWHERE id = 1116;console iauDEALRISKS IEUDTEUEUTEUvA jiminny@localhostA console (jiminny@localhost)I (jiminny@localhost)AHS.Jlocal jiminny@localhost4SFjiminny@localhost)4 zoho_dev ([iminny@localhost)$8public const string TYPE_DATEpublic const string TYPE_TIMEpublic const string TYPE_DATETIMEpublic const string TYPE_UNSUPPORTED = 'unsupported" :public const string OBJECT_LEADpublic const string OBJECT_ACCOUNT= 'account':public const string OBJECT_CONTACT='contact';public const string OBJECT_OPPORTUNITY= 'opportunity":267269=270271_272—273-274 v=775"provider_user_token": "v1u:AQ[BAHJ-LzTNK2yuvuaLq¿fzh#Ъ9crUNKTpk«FLQ9гjnXqP_6АЕQhОh0QVa1nvNCHEvпpvSEAAAAfjB8Bgkqhki69»ЄBBw"provider_refresh_token": "5034113:19SSS731:87c14258f8c813d02767ee975f6844d46b6b2bfc*,"exotres":7989199select * Fron ern Field valuesselect * fron eon fields where twoe = "nultcoickuistesMLECT * FROM crn_Layouts WHERE Uwid_to_bin(*7C327871-fc25-4c56-9a0f-44c5a849d65c*) = uuid;crn_layout_entities WHERE crn_layout_id = 282SELECT * FROM Crn_fields WHERE 1d = 3014;SELECT * FRON crn_field_values WHERE crm_field_1d = 3814+,o, cB DatabaseV AEUconsoleviminnweloca nost4 SF 1 5 749 гAHSwlocelV A PRODA consoleV A STAGINGconsolaTnlockerF OutputmW 9rows sBid Yjiminny.crm.Jayout_entities x500#QEAA®wvid (UUIO with tine-Low and tine-high swapped) Ycrn_ layout_id Y932 039fcbe4-244а-49ff-9a83-256bS3c97006933 54415f8f-9f04-435d-9b6a-2fa0e178Ce61934 002c9de1-4deS-4bb9-9897-15221485a95e935 da3f8bdS-639a-4263-a8e3-c90a015f48eb036.08805666-a87h-4489-a678-91774801111746937 496726ba-deb0-489f-8651-229d77fa8785938 755bSf1d-dfbf-4783-a45e-Bcf7359312c11790 c2055646-f552-46b1-8689-9200F156cc3d1789 33579bSf-6b86-4a8a-aBec-5363ebe861b2IR parent_entity_id y1idcontieldd282282282282282<null»<null»932932OKy932282282932( Label 7@description &<null> activity-sumnaryActivity Sunnary<null> follow-upNext Steps….1879 <null>1880 <null><nutl»1882 <nutl1RR2 coulns«null1885 <null>1943 Location1984 OutcomeCall OutcomeI default_value Y<null»<null»<null><null>null»<null»<null><null>Dis_nandatory Ytmuc totriovod ctortina tram in , 222100%LXThu 28 May 9:26:02U TextRelayServiceTest~Cascaderner hensewiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a few things you'd need in place:1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE_TEXT_RELAY_TOPIC=DEPLOY _REGION=the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com* eu or us3. Run the sync manually via tinker (inside docker_lanp_1):eossttdocker exec -it docker_lamp_1 php artisan tinker• 0app(\Jininny\ServicesVMail\TextRelayService::class)->sync();Caveat: The service reads from Gmail history and a spatches lobs to the queuc. lt you don't want it to actuallysend SMS, make sure QUEUE_CONNECTICN-sync is not set (or use a test queue), or just call isForCurrentEnvironmentorectly via tinker to verity the header loaic without disoatchino amvthinotioh.Ssve = new class extends \Jiminny\ServicesVa1l\TextRelayService ( public functionconstructtAsk amthine (+y codacuhntive• oDis,visible YD read_onlyD sequenceCSVV2u→.0created_at V@updated._at0 2022-12-15 14:53:052022-12-15 141 2022-12-15 14:53:052022-12-15 148 2022-12-15 14:53:052022-12-15 141 2822-12-15 14:53:052022-12-15 147 2822-12015 14:53:892822-10-153 2822-12-15 14.53:094 2822-12-15 14:53:056 2823-02-15 17:02:50S 2023-02-15 17:02:342022-12-15 112923-92-15 12023-02-15 1:N Mnhaur Tosme 27A80 lITE8 ensao...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79355
|
2784
|
39
|
2026-05-28T06:26:04.943331+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949564943_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4662179081001855424
|
-8776008077708915726
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
79353
|
NULL
|
NULL
|
NULL
|
|
79356
|
2785
|
28
|
2026-05-28T06:26:06.018822+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949566018_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7650400725798722197
|
5771048316864018365
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
79354
|
NULL
|
NULL
|
NULL
|
|
79357
|
2785
|
29
|
2026-05-28T06:26:07.275547+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949567275_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Related Rows
More
Project: faVsco.js, menu
JY-2091 Related Rows
More
Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Related Rows","depth":3,"bounds":{"left":0.4351729,"top":0.6217079,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More","depth":3,"bounds":{"left":0.44381648,"top":0.6217079,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"bounds":{"left":0.6868351,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6984708,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.7077792,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.7194149,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.7293883,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7390292,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7463431,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-6673006839764770537
|
6685203931320227421
|
click
|
accessibility
|
NULL
|
Related Rows
More
Project: faVsco.js, menu
JY-2091 Related Rows
More
Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79358
|
2784
|
40
|
2026-05-28T06:26:07.172839+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949567172_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-7228688528716742632
|
2609222811515291121
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"X4-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79359
|
2784
|
41
|
2026-05-28T06:26:17.212649+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949577212_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014;\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-2398651927323959986
|
6685203931320227421
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
79358
|
NULL
|
NULL
|
NULL
|
|
79360
|
2784
|
42
|
2026-05-28T06:26:17.889185+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949577889_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-8048766869408449997
|
5771048316864018365
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79361
|
2785
|
30
|
2026-05-28T06:26:17.993640+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949577993_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Related Rows
More
Project: faVsco.js, menu
JY-2091 Related Rows
More
Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Related Rows","depth":3,"bounds":{"left":0.4956782,"top":0.6217079,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More","depth":3,"bounds":{"left":0.5043218,"top":0.6217079,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8355492871853105376
|
-8780371970271009838
|
click
|
hybrid
|
NULL
|
Related Rows
More
Project: faVsco.js, menu
JY-2091 Related Rows
More
Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
rnpstomViewNeWENNCCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaproidet© SyncMailbox.phpEinfection ison disTextRelayServiceTest.phpPyyminny.on3.env.productionMENSTAmclass Field extends ModelMANISRNAWERHOsanemajiminny_storagewulicancas mapublic const int NAME_MAX_LENGTH = 128:public const int LABEL_MAX_LENGTH = 255;M Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM+README.mdô sonar-proiect propertiesE test.pySUn tieo aciam-xmiis vetur.confialis8 090:0880 c0public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoind TYPE CURRENYM. WEBHOOK FILTERNG-MPLEMENTAToublic const stoing TYPE BOOLEAN> 1h Extemal Librariesv E Scratches and Consolesoub1e const stoino TYPE TEXTAREAServicht+.@cBQutoti liminoy.crm lavout entitiesv E DatabaseV AEMRW 9rowsd =6Duvid (UUID with time-low and time-high swapped) Vconsole032 Az04chel-2hha-1044.0083-256653c0788.vlttinnwoloetosASF 15 749 г933 54415f8f-9f84-435d-9b6a-2faße178ce6:934 002c9d01-4deS-4bb9-9a97-15221485a95APROD935 da3f8bdS-639a-4263-a8e3-c90a815f48ehconsoleASTAGING36 [CREDIT_CARD]-8478-91178erat4:consoleoxy horwnns-den:c norerhsewroethtDocker938 75SbSf1d-dfbf-4783-a4Se-8cf7359312c1790 c205S646-fSS2-46b1-8689-9200f156cc3g1789 3357965f-6b86-4a8a-a8ec-5363ebe861b2Tho Huncnoll nhhin hac Hoon H.MockeriitTEWEAVcustom.loglaravel.logSF (iminny@localhost) xHSJocal jiminny@blocalhost)# console pron# consolefFulA console (STAGINGTc Autoy"provider_user_token": "vlu:AQIBAHj-L2/NK2yuuuaLgifzhab9crUNK1pk4F1Q9njnXqp_6AEQhDhDQVa1nv#CHEvnpvstAAAAtJ888gkgnK15УaUB8#"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc""expires": 1779891997,sellect * &rom ernSield vallues271274V$ 2select * fron crn fields where type = 'multi-picklist':SELECT * FROM crn layouts WHERE uuid to bin *7c327871-fc25-4c56-9a8f-44c5a849d65c') • uuid:SELECT * FROM crn layout entities WHERE crn layout 1d = 282:SELECT * FROM crn fields WHERE 1d = 3014:SELECT * FROM crn field values WHERE crm field 1d = 3814crn layoutamI2 parent entity id ?oeonsedsohTOOУLYThu 28 May 9:26:17TextRelayServiceTesteeendhrner hensewiet+0.can I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manuallv vin tinker tinside docker 1aeo 10%M bashAck amwinine t<CodeAdhotiv1s_vis1ble 1meadoniv282282282282282282282coul1scnull>932932932932‹null> activity-sunnary<null> follow-up1879 <nulle1880 cnulle1882 <null:RRk comnAAAS conlls1943 Location1984 OutconeldesereietoniActivity SunnaryNext Steps….cnulaconllsCall Outcon.@ default_value V1s_mandatorycoulls<null><null><null><null»comiissnull»snull>chulh2U→.0seauence@created_at W8 2822-12-15 14:53:091 2822-12-15 14:53:098 2822-12-15 14:53:0912822-12-15 14:53:09148201015-1415348542029.12.15 14-67-906 2823-82-15 17:02:565 2823-82-15 17:02:34Tiundatertai2022-12-15 12022-12-15 142022-12-15 142022-12-1514[PHONE]22-12-15 1AnX-An.1G2023-02-15 15111:022 74MMaud Toome 27ke0 litee hensdd....
|
79357
|
NULL
|
NULL
|
NULL
|
|
79365
|
2784
|
44
|
2026-05-28T06:26:25.824728+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949585824_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 Running['artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"О 84-zsh85...ip-10-30-129-190:~ (nc)XIT2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)QX 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
-8753367278576725461
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 Running['artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"О 84-zsh85...ip-10-30-129-190:~ (nc)XIT2PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)QX 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79366
|
2784
|
45
|
2026-05-28T06:26:27.150233+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949587150_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-8048766869408449997
|
5771048316864018365
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan...
|
79365
|
NULL
|
NULL
|
NULL
|
|
79367
|
2785
|
33
|
2026-05-28T06:26:25.931462+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949585931_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormViewNeWENNCCoocKetucioTOOI-WindowFV faVsco PhpStormViewNeWENNCCoocKetucioTOOI-WindowFV faVsco.s ~$ JY-20915-fix-missing-header-text-relaproidetcKerosoh© SyncMailbox.phpEinfection ison disTextRelayServiceTest.phpfyyminny.oho3.env.productionMAINSTAIMclass Field extends ModelMANiStNAwERtosanemajiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml18 raw.sal.query.solM: README.mdô sonar-proiect propertiesEtest.ov<> Untitied Diagram.xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT•h Extemal Uibrariedv E Scratches and ConsolesServicht+@C0*v E DatabaseV AEconsoleAliminnyelocalhostASF 1s749 msVPRODconsoleSTAGING& consoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;8 090:08public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist";Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISToubiac const stoind TYpE NunsER• "oicklist':mber*oublaic const stoing TYPE CURRENCYoubidic const string TYPE BOOLEA"boolean';"Textoub dic const strind thpe textoub1e const stoino TYPE TEXTAREAS000%LXThu 28 May 9:26:25TextRelayServiceTestMockeriitTEWEAVcustom.logsravelloSF (iminny@localhost) xun crm.fields (jminnytalocalhost) xA console (EU]A console [STAGINGyout-99tAHERE 10 = 7889# HS Jocal jiminny@tocalhostQrERgм=•OROER 8console (PROD)CSLLDOeBIMM IMICaer henseictcan I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERCOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY _REGION=the cnail nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nameeu or ue3. Run the svnc manualiv vin tinker tinside docker 1ae 10lM bashAck amwinino t+ & CodeAdhotivTho Huncnoll ninin hac hoonWindcud Tosm....
|
NULL
|
-7635512310915107934
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormViewNeWENNCCoocKetucioTOOI-WindowFV faVsco PhpStormViewNeWENNCCoocKetucioTOOI-WindowFV faVsco.s ~$ JY-20915-fix-missing-header-text-relaproidetcKerosoh© SyncMailbox.phpEinfection ison disTextRelayServiceTest.phpfyyminny.oho3.env.productionMAINSTAIMclass Field extends ModelMANiStNAwERtosanemajiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml18 raw.sal.query.solM: README.mdô sonar-proiect propertiesEtest.ov<> Untitied Diagram.xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT•h Extemal Uibrariedv E Scratches and ConsolesServicht+@C0*v E DatabaseV AEconsoleAliminnyelocalhostASF 1s749 msVPRODconsoleSTAGING& consoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;8 090:08public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist";Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISToubiac const stoind TYpE NunsER• "oicklist':mber*oublaic const stoing TYPE CURRENCYoubidic const string TYPE BOOLEA"boolean';"Textoub dic const strind thpe textoub1e const stoino TYPE TEXTAREAS000%LXThu 28 May 9:26:25TextRelayServiceTestMockeriitTEWEAVcustom.logsravelloSF (iminny@localhost) xun crm.fields (jminnytalocalhost) xA console (EU]A console [STAGINGyout-99tAHERE 10 = 7889# HS Jocal jiminny@tocalhostQrERgм=•OROER 8console (PROD)CSLLDOeBIMM IMICaer henseictcan I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERCOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPICDEPLOY _REGION=the cnail nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nameeu or ue3. Run the svnc manualiv vin tinker tinside docker 1ae 10lM bashAck amwinino t+ & CodeAdhotivTho Huncnoll ninin hac hoonWindcud Tosm....
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79368
|
2785
|
34
|
2026-05-28T06:26:28.109783+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949588109_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7650400725798722197
|
5771048316864018365
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}...
|
79367
|
NULL
|
NULL
|
NULL
|
|
79369
|
2784
|
46
|
2026-05-28T06:26:28.212017+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949588212_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-7635200922161528077
|
-4598385934329243181
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79370
|
2785
|
35
|
2026-05-28T06:26:29.936846+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949589936_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"bounds":{"left":0.6868351,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6984708,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.7077792,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.7194149,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.7293883,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7390292,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7463431,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; \nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; \nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
1117820647247163934
|
6685203931320227421
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79371
|
2784
|
47
|
2026-05-28T06:26:30.041931+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949590041_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"}]...
|
7353428460411642686
|
5771048317937760189
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2...
|
79369
|
NULL
|
NULL
|
NULL
|
|
79372
|
2785
|
36
|
2026-05-28T06:26:31.017431+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949591017_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-1752890267531063518
|
-6618672614029721119
|
typing_pause
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
PhpStormViewCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missProinet veKerodlohs© SyncMailbox.php2 test.pyTextRelayServiceTest.phpfyyminny.oho3.env.productionUnaded Uragkam.xmisvetur.confia.iM+WEBHOOK_FILTERING._IMPLEMENTATclass Field extends Model→10 extemal Lioraniesv EScratches and Consolesv Database ConsolesconsolezulADEAL RISKS (EU"vminnwoehoconsolelliminnyocooftiiminny @locainos4 HSJJocal jiminny@localhost)A SF jiminny@localhost)A zoho_dev (iminny@localhost)V & PRODconenle lpronServicht+@C0*v E DatabaseV AEconsoleAliminnyelocalhost4SF 1 $ 749 mserm fields 10 gVPRODconsoleSTAGING& consoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;8 090:08public const int DESCRIPTION MAX_ LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist";Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISToubluic const stoing TYPE NunBERoublaic const stoind TYPE CURRENY• "oicklist':• numbeney :oub aic const string TYPE BOOLEAoub dic const strind thpe textoub1e const stoino TYPE TEXTAREA"textS000%LXThu 28 May 9:26:30TextRelayServiceTestMockeriitTEWEAVTI1I II IIcustom.logsravelloSF (iminny@localhost) xun crm.fields jminnytalocalhost)# HS Jocal jiminny@localhost# consolel poonA console (EU]A console [STAGING"provider_user_token": "viu:AQJBAHj-Lz/NK2yuuuaLqifzhab9crUNK1pk4F109rjnXqp_6AEQhDhDQVa1nviCHEvnpvstAAAAtJ5889kqnK1БУwU58#"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc""expires": 1779891997,select * &rom crnSield valuesselect * fron crn fields where type = 'multi-picklist':SELECT * FROM crn layouts WHERE uuid to bin *7c327871-fc25-4c56-9a8f-44c5a849d65c') • uuid:SELECT * FROM crn layout entities WHERE crn layout 1d = 282:SELECT * FROM crn fields WHERE 1d = 3014; #CSIEAT & SOOM Ann Gold wolmoc wHSos ane Gold A7992rner hensewiet+0.can I test it locally first. if I place env from staging1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nameeu or ue3. Run the svnc manualiv vin tinker tinside docker 1ae 10lAck amwinino t<CodeAdhotivTho Huncnoll nimin hac hoonMndaur Tosme 276A4 TlTSeensAo....
|
79370
|
NULL
|
NULL
|
NULL
|
|
79373
|
2784
|
48
|
2026-05-28T06:26:31.120912+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949591120_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7923424182753190895
|
-8780372176425246254
|
typing_pause
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)ffmpeg84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79374
|
2784
|
49
|
2026-05-28T06:26:35.894518+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949595894_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":true,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8673302249742970920
|
6685203931303450205
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
79373
|
NULL
|
NULL
|
NULL
|
|
79375
|
2785
|
37
|
2026-05-28T06:26:36.319720+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949596319_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
20976792575956998
|
5771048316864018365
|
typing_pause
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
Execute
Explain Plan
Browse Query History
View Parameters
Open Query Execution Settings…
In-Editor Results
Tx: Auto
Cancel Running Statements
Playground...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79376
|
2784
|
50
|
2026-05-28T06:26:43.842105+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949603842_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
811621196224090688
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp• 0DOCKER₴81T1DOCKER (docker-compose)DEV (docker)₴2-zsh883&1docker_lamp_1-2026-05-28 06:25:25 Running ['artisan'mailbox:text-relay:sync] [IP_ADDRESS]/May/2026:06:25:22+0000 "GET /index.php"500 /home/jiminny/public/index.php 3096.31614336 wwwdocker_lamp_1docker_lamp_1docker_lamp_11 Relayed 0 message(s).5s DONE, '/usr/local/bin/php' 'artisan'mailbox:text-relay:sync › '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:31 RunningC'artisan'conference:pre-meeting-notificationj127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |docker_lamp_1l '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:38 Running ['artisan'conference:monitor:start] ... 4s DONEdocker_1amp_1• '/usr/local/bin/php' 'artisan'conference:monitor:start > */proc/1/fd/1• 2>&1docker_lamp_12026-05-28 06:25:43 Running ['artisan'conference:monitor:end] [IP_ADDRESS]/May/2026:06:25:40 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 6651.294 1docker_lamp_15S DONEdocker_lamp_1....*'/usr/local/bin/php' 'artisan' conference:monitor:end> "/proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:48 Running ['artisan' jiminny:fix-hubspot-tokens] . 3s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan' jiminny:fix-hubspot-tokens › '/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:52 Running ['artisan'conference:pre-meeting-reminder] in background11.16ms DONEdocker_lamp_1 |l ('/usr/local/bin/php' 'artisan' conference:pre-meeting-reminder › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan'schedule: finish "framework/schedule-805efb16Oee8d9da0Ze60364ace7970eb2b35f31" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan' hubspot:journal-poll --start] in b1.52ms DONEdocker_lamp_1l ('/usr/local/bin/php' 'artisan' hubspot: journal-poll --start › '/proc/1/fd/1' 2>&1 ; '/usr/local/bin/php' 'artisan' schedule:finish "framework/schedule-e26d77f915d2c55fe91ca4148a230e32eaa1865e" "$?") > '/dev/null' 2>&1 &docker_1amp_12026-05-28 06:25:52 Running ['artisan'crm: bullhorn:ping--heartbeat] 12728/May/2026:06:25:51 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 8[PHONE]6 wwwView in Docker Desktop• View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] T3 EU (-zsh)*** System restart required ***Last login: Tue May 26 06:32:33 2026 from 212.5.153.87lukas@jiminny-eu-bastion:~$ client_loop: send disconnect: Broken pipe@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [|T4STAGE (ssh)Run 'do-release-upgrade' to upgrade to it.STAGESystem restart required ***Last login: Mon May 18 06:46:53 2026 from 212.5.153.87tion:~$ |T5QA (-zsh)X 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79377
|
2785
|
38
|
2026-05-28T06:26:43.948070+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949603948_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-4662179081001855424
|
-8776008077708915726
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
rnpstomViewCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaProinet v© SyncMailbox.php2 test.pyTextRelayServiceTest.phpPyyminny.on3.env.productionUnaded Uragkam.xmisvetur.confia.iM+WEBHOOK_FILTERING._IMPLEMENTAT> (h Exteral Librariesv EScratches and Consolesclass Field extends Modelv Database ConsolesV AEUconsolezulADEAL RISKS (EU"AEU TEUTytminnwoohoconsolelliminnyocoowtiiminny @locainos4 HSJJocal jiminny@localhost)A SF jiminny@localhost)A zoho_dev (iminny@localhost)V & PRODconcnle lpeonServicht+.OCv E DatabaseV AEconsolevlttinnwooetos. SF 6 $#HS locall% crmarields 23 $VPRODconsoleSTAGING& consoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;public const int DESCRIPTION MAX_ LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISTockustoubluic const stoing TYPE NunBERoublaic const stoind TYPE CURRENYoublic const stoing TYPE BOOLEANoub1e const stoino TYPE TEXTAREABQutotfiR limiomw.crm lavout entitios xTx.TMRW9rows4 = 6id pDuvid (UUID with time-low and time-high swapped) V032 Az04chel-2hha-1044.0083-256653c0[PHONE]5f8f-9f84-435d-9b6a-2faße178ce6:934 002c9d01-4deS-4bb9-9a97-15221485a95935 da3f8bdS-639a-4263-a8e3-c90a815f48eh36 [CREDIT_CARD]-8478-91178erat4:oxy horwnns-den:-h:or-8heroetaht938 75SbSf1d-dfbf-4783-a4Se-8cf7359312c1790 c2055646-fSS2-46b1-8689-9200f156cc301789 3357965f-6b86-4a8a-a8ec-5363ebe861b2amniotorne11me• DockerfileTEWEAVcustom.losravelloSF (iminny@localhost)un crm.fieids jiminny@blocalhost)# HS Jocal jiminny@tocalhost# console lPeonA console (EU]A console [STAGING)provider_user_token": "vlu:AQJBAHj-L2.NK2yuuuaLqifzhab9crUNK1pk4F1Q9rjnXqp_6AEQhDh0QVa1nviCHEvnpvstAAAAt08889kqnk1bYwU88w89orowiiden retroch token". "sexck.1osssyk1.8rciLy8.8c81308221676091154684404666626f6"exorires": 1779891992flect * fron crm_field_values:274= 276ilect * fron crm fields where type = "nulti-picklist':ELECT * FROM crm layouts WHERE uuid to bin(*7c327871-fc25-4c56-9a0f-44c5a849d65c') • uuid:ELECT * FROM crm layoutl entities WHERE crn layout id = 282; 6sELECT * FROM crm fields WHERE 1d = 3014; # 1885ELECT * FROM crm field values WHERE crn field 1d = 3014crn layoutamI2 parent entity id ?TO0УLYThu 28 May 9:26:43TextRelayServiceTesteeendhler henwserwiet+0.can I test it locally first. if I place env from stagingYes. The service relies on a tew thinas vou'd need in place1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic namaeu or us3. Run the svnc manualiv vin tinker tinside docker 1aeo 1%M bashACk amwiningt+ <> CodeAdhotiv1s_vis1ble 1meadonivseauence282282282282282282282coul1scnull>932932932932ldesereietoni‹null> activity-sunnaryActivity Sunnary<null> follow-up1879 <nulle1880 cnulle1882 <null:RRk comnAAAS conlls1943 Location1984 OutconeNext Steps….cnullaCotihCall Outcon.@ default_value V1s_mandatorycoulls<null><null><null><null»comiissnull»snull>cnul2U→.0@created_at W8 2822-12-15 14:53:091 2822-12-15 14:53:098 2822-12-15 14:53:0912822-12-15 14:53:09148201015-1415348542029.12.15 14-67-906 2823-82-15 17:02:565 2823-82-15 17:02:34Tiundatertai2022-12-15 12022-12-15 142022-12-15 142022-12-1514[PHONE]22-12-15 1AnX-An.1G2023-02-15 1Mndeur Tosme 27126 lITC 8 enano....
|
79375
|
NULL
|
NULL
|
NULL
|
|
79378
|
2785
|
39
|
2026-05-28T06:26:45.930470+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949605930_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"bounds":{"left":0.375,"top":0.10055866,"width":0.010305851,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"bounds":{"left":0.38730052,"top":0.10055866,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.39694148,"top":0.09896249,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.40425533,"top":0.09896249,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\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.41289893,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"bounds":{"left":0.42154256,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"bounds":{"left":0.4325133,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"bounds":{"left":0.44115692,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"bounds":{"left":0.44980052,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"bounds":{"left":0.46077126,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"bounds":{"left":0.47174203,"top":0.09896249,"width":0.024268618,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"bounds":{"left":0.49833778,"top":0.09896249,"width":0.008643617,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"bounds":{"left":0.5093085,"top":0.09896249,"width":0.029587766,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"bounds":{"left":0.7237367,"top":0.09896249,"width":0.02825798,"height":0.01915403},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.042220745,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"bounds":{"left":0.6868351,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"bounds":{"left":0.6984708,"top":0.123703115,"width":0.00731383,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"bounds":{"left":0.7077792,"top":0.123703115,"width":0.009640957,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"bounds":{"left":0.7194149,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"bounds":{"left":0.7293883,"top":0.123703115,"width":0.007978723,"height":0.015163607},"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"bounds":{"left":0.7390292,"top":0.12210695,"width":0.00731383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"bounds":{"left":0.7463431,"top":0.12210695,"width":0.006981383,"height":0.018355945},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"bounds":{"left":0.011968086,"top":0.047885075,"width":0.024268618,"height":0.024740623},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.27027926,"top":1.0,"width":0.008643617,"height":0.0},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8673302249742970920
|
6685203931303450205
|
visual_change
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79379
|
2784
|
51
|
2026-05-28T06:26:46.465535+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949606465_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Start Listening for PHP Debug Connections","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"42","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"4","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","depth":4,"on_screen":true,"value":"<?php\n\nnamespace Jiminny\\Models\\Crm;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\Scope;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsTo;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasMany;\nuse Jiminny\\Component\\Eloquent\\Builder;\nuse Jiminny\\Models\\Ai\\CrmTemplateField;\nuse Jiminny\\Models\\Model;\nuse Jiminny\\Models\\Playbook;\nuse Jiminny\\Services\\Crm\\CrmObjects\\FieldReadonlyConstants;\nuse Jiminny\\Services\\Crm\\IntegrationApp\\DTO\\CrmFieldDefinitionsManager;\nuse Jiminny\\Traits\\Enums;\nuse Jiminny\\Traits\\RequiresUUID;\n\n/**\n * Jiminny\\Models\\Crm\\Field\n *\n * @property int $id\n * @property mixed|null $uuid\n * @property int $crm_configuration_id\n * @property string $crm_provider_id\n * @property string $label\n * @property string|null $description\n * @property string $type\n * @property int|null $length\n * @property string|null $default_value\n * @property string $object_type\n * @property bool $is_selectable\n * @property bool $is_mandatory\n * @property bool $is_filterable\n * @property bool $is_indexable\n * @property \\Illuminate\\Support\\Carbon|null $created_at\n * @property \\Illuminate\\Support\\Carbon|null $updated_at\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $configuration\n * @property-read \\Jiminny\\Models\\Crm\\Configuration $crm\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldData> $data\n * @property-read int|null $data_count\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\LayoutEntity> $entities\n * @property-read int|null $entities_count\n * @property-read string $id_string\n * @property-read Collection<int, \\Jiminny\\Models\\Crm\\FieldValue> $values\n * @property-read int|null $values_count\n *\n * @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)\n * @method static \\Database\\Factories\\Crm\\FieldFactory factory(...$parameters)\n * @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)\n * @method static Builder|Field indexable()\n * @method static Builder|Field newModelQuery()\n * @method static Builder|Field newQuery()\n * @method static Builder|Field query()\n * @method static Builder|Field tasks()\n * @method static Builder|Field uuid(string $uuid, bool $first = true)\n * @method static Builder|Field whereCreatedAt($value)\n * @method static Builder|Field whereCrmConfigurationId($value)\n * @method static Builder|Field whereCrmProviderId($value)\n * @method static Builder|Field whereDefaultValue($value)\n * @method static Builder|Field whereDescription($value)\n * @method static Builder|Field whereId($value)\n * @method static Builder|Field whereIsFilterable($value)\n * @method static Builder|Field whereIsIndexable($value)\n * @method static Builder|Field whereIsMandatory($value)\n * @method static Builder|Field whereIsSelectable($value)\n * @method static Builder|Field whereLabel($value)\n * @method static Builder|Field whereLength($value)\n * @method static Builder|Field whereObjectType($value)\n * @method static Builder|Field whereType($value)\n * @method static Builder|Field whereUpdatedAt($value)\n * @method static Builder|Field whereUuid($value)\n *\n * @mixin \\Eloquent\n */\nclass Field extends Model\n{\n use HasFactory;\n\n use RequiresUUID;\n use Enums;\n\n public const int NAME_MAX_LENGTH = 128;\n public const int LABEL_MAX_LENGTH = 255;\n public const int DESCRIPTION_MAX_LENGTH = 191;\n\n public const string TYPE_MULTIPICKLIST = 'multi-picklist';\n // Not yet supported\n public const string TYPE_PERCENT = 'percent';\n\n public const string TYPE_PICKLIST = 'picklist';\n public const string TYPE_NUMBER = 'number';\n public const string TYPE_CURRENCY = 'currency';\n public const string TYPE_BOOLEAN = 'boolean';\n public const string TYPE_TEXT = 'text';\n public const string TYPE_TEXTAREA = 'textarea';\n public const string TYPE_EMAIL = 'email';\n public const string TYPE_PHONE = 'phone';\n public const string TYPE_URL = 'url';\n public const string TYPE_DATE = 'date';\n public const string TYPE_TIME = 'time';\n public const string TYPE_DATETIME = 'datetime';\n public const string TYPE_UNSUPPORTED = 'unsupported';\n\n public const string OBJECT_LEAD = 'lead';\n public const string OBJECT_ACCOUNT = 'account';\n public const string OBJECT_CONTACT = 'contact';\n public const string OBJECT_OPPORTUNITY = 'opportunity';\n public const string OBJECT_TASK = 'task';\n public const string OBJECT_EVENT = 'event';\n public const string OBJECT_CALL = 'call';\n public const string OBJECT_MEETING = 'meeting';\n\n public const array BUSINESS_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'Type',\n Configuration::PROVIDER_HUBSPOT => 'dealtype',\n ];\n\n public const array PIPELINE_TYPE_FIELDS = [\n Configuration::PROVIDER_HUBSPOT => 'pipeline',\n ];\n\n public const array STAGE_TYPE_FIELDS = [\n Configuration::PROVIDER_SALESFORCE => 'StageName',\n Configuration::PROVIDER_HUBSPOT => 'dealstage',\n Configuration::PROVIDER_CLOSE => 'status_id',\n Configuration::PROVIDER_BULLHORN => 'status',\n Configuration::PROVIDER_PIPEDRIVE => 'stage_id',\n Configuration::PROVIDER_COPPER => 'pipeline_stage_id',\n ];\n\n public static $enumTypes = [\n self::TYPE_PICKLIST,\n self::TYPE_NUMBER,\n self::TYPE_CURRENCY,\n self::TYPE_BOOLEAN,\n self::TYPE_TEXT,\n self::TYPE_TEXTAREA,\n self::TYPE_EMAIL,\n self::TYPE_PHONE,\n self::TYPE_URL,\n self::TYPE_DATE,\n self::TYPE_TIME,\n self::TYPE_DATETIME,\n self::TYPE_UNSUPPORTED,\n ];\n\n public static $enumObjectTypes = [\n self::OBJECT_LEAD,\n self::OBJECT_ACCOUNT,\n self::OBJECT_CONTACT,\n self::OBJECT_OPPORTUNITY,\n self::OBJECT_TASK,\n self::OBJECT_EVENT,\n ];\n\n protected $table = 'crm_fields';\n\n protected $fillable = [\n 'crm_configuration_id',\n 'crm_provider_id',\n 'object_type',\n 'type',\n 'label',\n 'description',\n 'is_selectable',\n 'is_mandatory',\n 'length',\n 'default_value',\n 'is_indexable',\n 'is_filterable',\n 'is_readonly',\n ];\n\n protected $appends = [\n 'id_string',\n ];\n\n protected $hidden = [\n 'uuid',\n 'id',\n 'crm_configuration_id',\n ];\n\n protected function casts(): array\n {\n return [\n 'is_selectable' => 'boolean',\n 'is_mandatory' => 'boolean',\n 'is_indexable' => 'boolean',\n 'is_filterable' => 'boolean',\n ];\n }\n\n public function configuration(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n public function entities(): HasMany\n {\n return $this->hasMany(LayoutEntity::class, 'crm_field_id');\n }\n\n public function getEntities(): Collection\n {\n /** @var Collection<LayoutEntity> $entities */\n $entities = $this->getAttribute('entities');\n\n return $entities;\n }\n\n public function values(): HasMany\n {\n return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');\n }\n\n public function getLabel(): string\n {\n return $this->getAttribute('label');\n }\n\n public function getType(): string\n {\n return $this->getAttribute('type');\n }\n\n public function getObjectType(): string\n {\n /** @var string */\n return $this->getAttribute('object_type');\n }\n\n public function getCrmProviderId(): string\n {\n /** @var string */\n return $this->getAttribute('crm_provider_id');\n }\n\n public function getValues(): Collection\n {\n return $this->getAttribute('values');\n }\n\n public function isIndexable(): bool\n {\n return $this->getAttribute('is_indexable');\n }\n\n public function isFilterable(): bool\n {\n return $this->getAttribute('is_filterable');\n }\n\n public function getId(): int\n {\n /** @var int */\n return $this->getAttribute('id');\n }\n\n public function hasDescription(): bool\n {\n return $this->getAttribute('description') !== null;\n }\n\n public function getDescription(): ?string\n {\n return $this->getAttribute('description');\n }\n\n public function data()\n {\n return $this->hasMany(FieldData::class, 'crm_field_id');\n }\n\n public function crm(): BelongsTo\n {\n return $this->belongsTo(Configuration::class, 'crm_configuration_id');\n }\n\n #[Scope]\n protected function indexable($query)\n {\n return $query->where('is_indexable', 1);\n }\n\n #[Scope]\n protected function tasks($query)\n {\n return $query->where('object_type', self::OBJECT_TASK);\n }\n\n public function isBusinessType(): bool\n {\n return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isStageField(): bool\n {\n return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function isPipelineField(): bool\n {\n return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)\n && $this->getObjectType() === self::OBJECT_OPPORTUNITY;\n }\n\n public function getUuid(): string\n {\n return $this->getAttribute('id_string');\n }\n\n public function getCrmConfiguration(): Configuration\n {\n return $this->getAttribute('crm');\n }\n\n public function getCrmConfigurationId(): int\n {\n return $this->getAttribute('crm_configuration_id');\n }\n\n /**\n * Currently implemented only for Opportunity fields\n */\n public function isReadOnly(): bool\n {\n // The CRM Field metadata should always be first to be taken into consideration.\n if ($this->getIsReadonly()) {\n return true;\n }\n\n if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {\n return false;\n }\n\n if ($this->isPipelineField()) {\n return true;\n }\n\n if ($this->getType() === Field::TYPE_UNSUPPORTED) {\n return true;\n }\n\n if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {\n $fieldDefinitions = new CrmFieldDefinitionsManager();\n\n return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);\n }\n\n return false;\n }\n\n public function isPicklist(): bool\n {\n return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);\n }\n\n public function getLength(): ?int\n {\n return $this->getAttribute('length');\n }\n\n public function getDefaultValue(): ?string\n {\n return $this->getAttribute('default_value');\n }\n\n public function setIsReadonly(int $isReadonly): void\n {\n $this->setAttribute('is_readonly', $isReadonly);\n }\n\n public function getIsReadonly(): bool\n {\n return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;\n }\n\n public function getEntityName(): string\n {\n return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();\n }\n\n public function crmTemplateFields(): HasMany\n {\n return $this->hasMany(CrmTemplateField::class, 'crm_field_id');\n }\n\n public function playbooks(): HasMany\n {\n return $this->hasMany(Playbook::class, 'activity_field_id');\n }\n\n public function getPlaybooks(): Collection\n {\n return $this->getAttribute('playbooks');\n }\n}","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Execute","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Explain Plan","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Browse Query History","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"View Parameters","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Open Query Execution Settings…","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"In-Editor Results","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Tx: Auto","depth":4,"on_screen":true,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Cancel Running Statements","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Playground","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"jiminny","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Sync Changes","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide This Notification","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":false,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Code changed:","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.088194445,"height":0.027777778},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"21","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"1","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"18","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"2","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXStaticText","text":"6","depth":4,"on_screen":true,"role_description":"text"},{"role":"AXButton","text":"Previous Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Next Highlighted Error","depth":4,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXTextArea","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","depth":4,"on_screen":true,"value":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o\nJOIN activities a ON o.id = a.opportunity_id\nWHERE a.crm_configuration_id = 39\nAND a.actual_start_time > '2025-10-13'\nAND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM activities\nWHERE crm_configuration_id = 39 and user_id = 143\nand actual_start_time >= '2025-10-13'\nAND type IN ('conference', 'softphone-inbound', 'softphone-outbound')\n;\n\nSELECT * FROM opportunities WHERE account_id IN (178);\nselect * from activities where id IN (620137, 620187, 620188, 620189, 620230);\n\n# HS\nSELECT * FROM opportunities WHERE id IN (238);\nselect * from activities where id IN (477,2076);\n\nselect * from users;\n\nSELECT COUNT(*) FROM users;\nSELECT COUNT(*) FROM activities;\nSELECT COUNT(*) FROM opportunities;\n\nUPDATE activities\nSET\n actual_start_time = '2025-12-19 09:00:00',\n actual_end_time = '2025-12-19 10:30:00',\n scheduled_start_time = '2025-12-19 09:00:00',\n scheduled_end_time = '2025-12-19 10:30:00'\nWHERE id IN (407509,407375);\n\nselect * from partners;\n\nSELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id\nFROM activities\nWHERE user_id = 143\nAND actual_start_time >= '2025-10-13 00:00:00'\nAND actual_start_time <= '2026-01-13 23:59:59'\nORDER BY actual_start_time DESC;\n\nSELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;\nSELECT * FROM crm_layouts where crm_configuration_id = 39;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\n# lead_id\n# account_id 177\n# contact_id 3969\n# opportunity_id\n# stage_id 203\n\nSELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;\n\nSELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'\nAND user_id = 143 and actual_start_time >= '2025-10-13';\n\nSELECT * FROM activities a\n# JOIN opportunities o ON a.opportunity_id = o.id\nWHERE a.crm_configuration_id = 39 AND a.type = 'conference'\nand status = 'completed' and recording_state = 'recorded'\nand a.actual_start_time >= '2025-10-13'\nAND a.user_id = 143\n;\n\nselect * from leads\nwhere crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707\n\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);\nSELECT * FROM activities WHERE id IN (356013,616188,616202,616310);\nSELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198\nSELECT * FROM activities WHERE id IN (356001, 356008); # contacts:\n\nSELECT * FROM opportunities WHERE id IN (1707);\nSELECT * FROM stages where id IN (204, 198);\nSELECT * FROM opportunities WHERE account_id IN (178);\nSELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';\nSELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal\n\nSELECT * FROM activities where crm_configuration_id = 39\nAND opportunity_id IS NULL\nAND is_internal = false\nand status = 'completed' and recording_state = 'recorded'\nAND actual_start_time >= '2025-10-13'\nAND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)\n# AND lead_id IN (112, 109)\n;\n\nSELECT * FROM crm_profiles WHERE user_id = 143;\n\nselect * from inboxes; # 212\nselect * from users where id = 143; # 143\nselect * from inbox_email_batches where inbox_id = 212\nand updated_at >= '2026-01-28 00:00:00' order by id desc;\nselect * from inbox_emails where inbox_id = 212\nand batch_id = 95885 order by id desc;\nselect * from email_messages where origin_user_id = 143;\nselect * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';\nselect * from participants where activity_id = 620247;\n\nselect * from crm_profiles where user_id = 143;\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001\nselect * from transcription where activity_id = 356001; # 6943\nselect * from ai_prompts where transcription_id = 6943;\nSELECT * FROM activity_summary_logs where activity_id = 356001;\n\nSELECT * FROM social_accounts WHERE sociable_id = 143;\n\n# ************************************************************************************\nSELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;\n# 422515 softphone tr. 8100\n\nSELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;\n# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS\n\nselect * from ai_prompts where transcription_id IN (8100, 7670);\nselect * from activity_summary_logs where activity_id = 407509;\n\nselect * from sidekick_settings;\nselect * from default_activity_types;\n\nSELECT * FROM contacts WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\nSELECT * FROM leads WHERE crm_configuration_id = 39 and email = 'm.kogoj@gmx.at';\n\nSELECT * FROM activity_searches where user_id = 143;\nSELECT * FROM groups where team_id = 1;\n\nselect * from teams where id = 1;\nselect * from groups where team_id = 1; # 1150 - 7e75f8025c22\nselect id, name, group_id, status, deleted_at, email\nfrom users where team_id = 1 order by group_id desc ;\n\nselect * from activity_searches where id in (1977, 1978, 1979);\nselect * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);\nselect * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277\nselect * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879\n\nINSERT INTO `activity_search_filters`\n(`activity_search_id`, `filter`, `value`) VALUES\n(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),\n(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')\n;\n\nselect * from crm_configurations where id = 39;\n\n\nselect sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id\nwhere u.team_id = 1;\nSELECT * FROM social_accounts WHERE sociable_id = 1635;\nSELECT * FROM users WHERE id = 1635;\n\nselect * from teams where id = 1;\nselect * from users where team_id = 1;\nselect * from team_features where team_id = 1;\nselect * from features;\n\nSELECT * FROM activity_searches where id = 1982; # 1981\nSELECT * FROM activity_search_filters WHERE activity_search_id = 1982;\n\nSELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;\nSELECT * FROM groups WHERE id = 1439;\nSELECT * FROM users WHERE group_id = 1439;\n\nselect * from permissions; # 158\nselect * from roles;\nselect * from permission_role;\n\nselect * from teams where id = 1;\nselect * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;\nselect * from groups where id = 28;\nselect * from playbooks where team_id = 1;\nselect * from playbooks where id = 179;\nselect * from playbook_categories where id = 1391;\nselect * from users where id = 143;\nselect * from crm_profiles where user_id = 143;\nselect * from activities where crm_configuration_id = 39 and type = 'conference'\nand crm_provider_id IS NOT NULL ORDER by id desc;\nselect * from activities where id = 422003; # 00UO400000pB6fpMAC\n\nSELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type\nFROM automated_report_results ar\nJOIN automated_reports a ON a.id = ar.report_id\nWHERE a.type = 'ask_jiminny'\nLIMIT 10;\n\nSELECT * FROM automated_reports where id = 71;\nSELECT * FROM automated_report_results where report_id = 71;\nUPDATE automated_reports set playbook_categories = NULL where id = 68;\nSELECT * FROM automated_report_results where id = 275;\n\nSELECT * FROM automated_reports order by id desc;\nSELECT * FROM automated_report_results order by id desc;\nselect * from activity_searches where user_id = 143;\nselect * from ask_anything_prompts;\n\nSELECT `automated_report_results`.* FROM `automated_report_results`\nINNER JOIN `automated_reports`\n ON `automated_report_results`.`report_id` = `automated_reports`.`id`\nWHERE 1=1\n AND `automated_report_results`.`generated_at` IS NOT NULL\n# AND `automated_report_results`.`sent_at` IS NOT NULL\n AND `automated_reports`.`team_id` = 1\n AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$.\"users\"')\n;\n\nSELECT * FROM automated_reports where id = 67;\nSELECT * FROM automated_reports where id = 42;\nSELECT * FROM users WHERE id = 143; # group 28\n\nselect * from teams where id = 3143;\nselect * from crm_configurations where id = 500;\nselect * from users where name = 'Integration Account'; # 1695\nSELECT * FROM social_accounts WHERE sociable_id = 1695;\n\nselect * from activities where crm_configuration_id = 39\nand recording_state = 'recorded' and duration > 60\nand status = 'completed' and actual_start_time >= '2025-12-01';\n\nSELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;\n\nselect * from leads;\n\nSELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003\nSELECT * FROM activities WHERE id IN (16,422003);\nSELECT * FROM activities where status = 'failed';\n\nSELECT * FROM tracks WHERE activity_id = 422003;\n\nSELECT\n a.*\nFROM activities a\nJOIN users u ON a.user_id = u.id\nWHERE\n a.status = 'completed'\n AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid\n AND a.deleted_at IS NULL\n AND EXISTS (\n SELECT 1 FROM tracks t\n WHERE t.activity_id = a.id\n AND t.type IN ('audio', 'video')\n )\nORDER BY a.actual_start_time DESC\nLIMIT 25;\n\nselect * from teams where id = 19;\nselect * from crm_configurations where provider = 'pipedrive';\nSELECT\n CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,\n u.email,\n sa.*,\n t.owner_id FROM social_accounts sa\nJOIN users u on u.id = sa.sociable_id\nJOIN teams t on t.id = u.team_id\nWHERE u.team_id = 19 and sa.provider = 'pipedrive';\n\nSELECT * FROM social_accounts WHERE id = 1116;\n\nUPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',\nprovider_refresh_token = '5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc',\nexpires = 1779091997,\nstate = 'connected'\nWHERE id = 1116;\n\n \"provider_user_token\": \"v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA\",\n \"provider_refresh_token\": \"5034113:19555731:87c14258f0c813d02767ee975f6044d46b6b2bfc\",\n \"expires\": 1779091997,\n\nselect * from crm_field_values;\n\nselect * from crm_fields where type = 'multi-picklist';\nSELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;\nSELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;\nSELECT * FROM crm_fields WHERE id = 3014; # 1885\nSELECT * FROM crm_field_values WHERE crm_field_id = 3014;","role_description":"text entry area","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Project","depth":3,"on_screen":false,"role_description":"text"},{"role":"AXButton","text":"Project","depth":3,"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"New File or Directory…","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Expand Selected","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Collapse All","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Options","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Hide","depth":4,"bounds":{"left":0.0,"top":0.0,"width":0.018055556,"height":0.026666667},"on_screen":false,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8673302249742970920
|
6685203931303450205
|
click
|
accessibility
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
Sync Changes
Hide This Notification
Code changed:
Hide
42
4
Previous Highlighted Error
Next Highlighted Error
<?php
namespace Jiminny\Models\Crm;
use Illuminate\Database\Eloquent\Attributes\Scope;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Jiminny\Component\Eloquent\Builder;
use Jiminny\Models\Ai\CrmTemplateField;
use Jiminny\Models\Model;
use Jiminny\Models\Playbook;
use Jiminny\Services\Crm\CrmObjects\FieldReadonlyConstants;
use Jiminny\Services\Crm\IntegrationApp\DTO\CrmFieldDefinitionsManager;
use Jiminny\Traits\Enums;
use Jiminny\Traits\RequiresUUID;
/**
* Jiminny\Models\Crm\Field
*
* @property int $id
* @property mixed|null $uuid
* @property int $crm_configuration_id
* @property string $crm_provider_id
* @property string $label
* @property string|null $description
* @property string $type
* @property int|null $length
* @property string|null $default_value
* @property string $object_type
* @property bool $is_selectable
* @property bool $is_mandatory
* @property bool $is_filterable
* @property bool $is_indexable
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Jiminny\Models\Crm\Configuration $configuration
* @property-read \Jiminny\Models\Crm\Configuration $crm
* @property-read Collection<int, \Jiminny\Models\Crm\FieldData> $data
* @property-read int|null $data_count
* @property-read Collection<int, \Jiminny\Models\Crm\LayoutEntity> $entities
* @property-read int|null $entities_count
* @property-read string $id_string
* @property-read Collection<int, \Jiminny\Models\Crm\FieldValue> $values
* @property-read int|null $values_count
*
* @method static Builder|Field chunkByIdDesc($count, callable $callback, $column = null, $alias = null)
* @method static \Database\Factories\Crm\FieldFactory factory(...$parameters)
* @method static Builder|Field idOrUuId($idOrUuid, bool $first = true)
* @method static Builder|Field indexable()
* @method static Builder|Field newModelQuery()
* @method static Builder|Field newQuery()
* @method static Builder|Field query()
* @method static Builder|Field tasks()
* @method static Builder|Field uuid(string $uuid, bool $first = true)
* @method static Builder|Field whereCreatedAt($value)
* @method static Builder|Field whereCrmConfigurationId($value)
* @method static Builder|Field whereCrmProviderId($value)
* @method static Builder|Field whereDefaultValue($value)
* @method static Builder|Field whereDescription($value)
* @method static Builder|Field whereId($value)
* @method static Builder|Field whereIsFilterable($value)
* @method static Builder|Field whereIsIndexable($value)
* @method static Builder|Field whereIsMandatory($value)
* @method static Builder|Field whereIsSelectable($value)
* @method static Builder|Field whereLabel($value)
* @method static Builder|Field whereLength($value)
* @method static Builder|Field whereObjectType($value)
* @method static Builder|Field whereType($value)
* @method static Builder|Field whereUpdatedAt($value)
* @method static Builder|Field whereUuid($value)
*
* @mixin \Eloquent
*/
class Field extends Model
{
use HasFactory;
use RequiresUUID;
use Enums;
public const int NAME_MAX_LENGTH = 128;
public const int LABEL_MAX_LENGTH = 255;
public const int DESCRIPTION_MAX_LENGTH = 191;
public const string TYPE_MULTIPICKLIST = 'multi-picklist';
// Not yet supported
public const string TYPE_PERCENT = 'percent';
public const string TYPE_PICKLIST = 'picklist';
public const string TYPE_NUMBER = 'number';
public const string TYPE_CURRENCY = 'currency';
public const string TYPE_BOOLEAN = 'boolean';
public const string TYPE_TEXT = 'text';
public const string TYPE_TEXTAREA = 'textarea';
public const string TYPE_EMAIL = 'email';
public const string TYPE_PHONE = 'phone';
public const string TYPE_URL = 'url';
public const string TYPE_DATE = 'date';
public const string TYPE_TIME = 'time';
public const string TYPE_DATETIME = 'datetime';
public const string TYPE_UNSUPPORTED = 'unsupported';
public const string OBJECT_LEAD = 'lead';
public const string OBJECT_ACCOUNT = 'account';
public const string OBJECT_CONTACT = 'contact';
public const string OBJECT_OPPORTUNITY = 'opportunity';
public const string OBJECT_TASK = 'task';
public const string OBJECT_EVENT = 'event';
public const string OBJECT_CALL = 'call';
public const string OBJECT_MEETING = 'meeting';
public const array BUSINESS_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'Type',
Configuration::PROVIDER_HUBSPOT => 'dealtype',
];
public const array PIPELINE_TYPE_FIELDS = [
Configuration::PROVIDER_HUBSPOT => 'pipeline',
];
public const array STAGE_TYPE_FIELDS = [
Configuration::PROVIDER_SALESFORCE => 'StageName',
Configuration::PROVIDER_HUBSPOT => 'dealstage',
Configuration::PROVIDER_CLOSE => 'status_id',
Configuration::PROVIDER_BULLHORN => 'status',
Configuration::PROVIDER_PIPEDRIVE => 'stage_id',
Configuration::PROVIDER_COPPER => 'pipeline_stage_id',
];
public static $enumTypes = [
self::TYPE_PICKLIST,
self::TYPE_NUMBER,
self::TYPE_CURRENCY,
self::TYPE_BOOLEAN,
self::TYPE_TEXT,
self::TYPE_TEXTAREA,
self::TYPE_EMAIL,
self::TYPE_PHONE,
self::TYPE_URL,
self::TYPE_DATE,
self::TYPE_TIME,
self::TYPE_DATETIME,
self::TYPE_UNSUPPORTED,
];
public static $enumObjectTypes = [
self::OBJECT_LEAD,
self::OBJECT_ACCOUNT,
self::OBJECT_CONTACT,
self::OBJECT_OPPORTUNITY,
self::OBJECT_TASK,
self::OBJECT_EVENT,
];
protected $table = 'crm_fields';
protected $fillable = [
'crm_configuration_id',
'crm_provider_id',
'object_type',
'type',
'label',
'description',
'is_selectable',
'is_mandatory',
'length',
'default_value',
'is_indexable',
'is_filterable',
'is_readonly',
];
protected $appends = [
'id_string',
];
protected $hidden = [
'uuid',
'id',
'crm_configuration_id',
];
protected function casts(): array
{
return [
'is_selectable' => 'boolean',
'is_mandatory' => 'boolean',
'is_indexable' => 'boolean',
'is_filterable' => 'boolean',
];
}
public function configuration(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
public function entities(): HasMany
{
return $this->hasMany(LayoutEntity::class, 'crm_field_id');
}
public function getEntities(): Collection
{
/** @var Collection<LayoutEntity> $entities */
$entities = $this->getAttribute('entities');
return $entities;
}
public function values(): HasMany
{
return $this->hasMany(FieldValue::class, 'crm_field_id')->orderBy('sequence');
}
public function getLabel(): string
{
return $this->getAttribute('label');
}
public function getType(): string
{
return $this->getAttribute('type');
}
public function getObjectType(): string
{
/** @var string */
return $this->getAttribute('object_type');
}
public function getCrmProviderId(): string
{
/** @var string */
return $this->getAttribute('crm_provider_id');
}
public function getValues(): Collection
{
return $this->getAttribute('values');
}
public function isIndexable(): bool
{
return $this->getAttribute('is_indexable');
}
public function isFilterable(): bool
{
return $this->getAttribute('is_filterable');
}
public function getId(): int
{
/** @var int */
return $this->getAttribute('id');
}
public function hasDescription(): bool
{
return $this->getAttribute('description') !== null;
}
public function getDescription(): ?string
{
return $this->getAttribute('description');
}
public function data()
{
return $this->hasMany(FieldData::class, 'crm_field_id');
}
public function crm(): BelongsTo
{
return $this->belongsTo(Configuration::class, 'crm_configuration_id');
}
#[Scope]
protected function indexable($query)
{
return $query->where('is_indexable', 1);
}
#[Scope]
protected function tasks($query)
{
return $query->where('object_type', self::OBJECT_TASK);
}
public function isBusinessType(): bool
{
return in_array($this->getCrmProviderId(), self::BUSINESS_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isStageField(): bool
{
return in_array($this->getCrmProviderId(), self::STAGE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function isPipelineField(): bool
{
return in_array($this->getCrmProviderId(), self::PIPELINE_TYPE_FIELDS)
&& $this->getObjectType() === self::OBJECT_OPPORTUNITY;
}
public function getUuid(): string
{
return $this->getAttribute('id_string');
}
public function getCrmConfiguration(): Configuration
{
return $this->getAttribute('crm');
}
public function getCrmConfigurationId(): int
{
return $this->getAttribute('crm_configuration_id');
}
/**
* Currently implemented only for Opportunity fields
*/
public function isReadOnly(): bool
{
// The CRM Field metadata should always be first to be taken into consideration.
if ($this->getIsReadonly()) {
return true;
}
if ($this->getObjectType() !== self::OBJECT_OPPORTUNITY) {
return false;
}
if ($this->isPipelineField()) {
return true;
}
if ($this->getType() === Field::TYPE_UNSUPPORTED) {
return true;
}
if ($this->getCrmConfiguration()->getProviderName() === Configuration::PROVIDER_INTEGRATION_APP) {
$fieldDefinitions = new CrmFieldDefinitionsManager();
return $fieldDefinitions->isReadOnly($this->getCrmProviderId(), self::OBJECT_OPPORTUNITY);
}
return false;
}
public function isPicklist(): bool
{
return in_array($this->getType(), [self::TYPE_PICKLIST, self::TYPE_MULTIPICKLIST]);
}
public function getLength(): ?int
{
return $this->getAttribute('length');
}
public function getDefaultValue(): ?string
{
return $this->getAttribute('default_value');
}
public function setIsReadonly(int $isReadonly): void
{
$this->setAttribute('is_readonly', $isReadonly);
}
public function getIsReadonly(): bool
{
return $this->getAttribute('is_readonly') !== FieldReadonlyConstants::FIELD_IS_UPDATABLE;
}
public function getEntityName(): string
{
return ucfirst($this->getObjectType()) . '.' . $this->getCrmProviderId();
}
public function crmTemplateFields(): HasMany
{
return $this->hasMany(CrmTemplateField::class, 'crm_field_id');
}
public function playbooks(): HasMany
{
return $this->hasMany(Playbook::class, 'activity_field_id');
}
public function getPlaybooks(): Collection
{
return $this->getAttribute('playbooks');
}
}
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
21
1
18
2
6
Previous Highlighted Error
Next Highlighted Error
SELECT a.id, a.uuid, a.actual_start_time, o.id, o.uuid FROM opportunities o
JOIN activities a ON o.id = a.opportunity_id
WHERE a.crm_configuration_id = 39
AND a.actual_start_time > '2025-10-13'
AND a.type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM activities
WHERE crm_configuration_id = 39 and user_id = 143
and actual_start_time >= '2025-10-13'
AND type IN ('conference', 'softphone-inbound', 'softphone-outbound')
;
SELECT * FROM opportunities WHERE account_id IN (178);
select * from activities where id IN (620137, 620187, 620188, 620189, 620230);
# HS
SELECT * FROM opportunities WHERE id IN (238);
select * from activities where id IN (477,2076);
select * from users;
SELECT COUNT(*) FROM users;
SELECT COUNT(*) FROM activities;
SELECT COUNT(*) FROM opportunities;
UPDATE activities
SET
actual_start_time = '2025-12-19 09:00:00',
actual_end_time = '2025-12-19 10:30:00',
scheduled_start_time = '2025-12-19 09:00:00',
scheduled_end_time = '2025-12-19 10:30:00'
WHERE id IN (407509,407375);
select * from partners;
SELECT id, uuid, type, actual_start_time, user_id, crm_configuration_id
FROM activities
WHERE user_id = 143
AND actual_start_time >= '2025-10-13 00:00:00'
AND actual_start_time <= '2026-01-13 23:59:59'
ORDER BY actual_start_time DESC;
SELECT * FROM activities WHERE uuid_to_bin('78eda160-3086-435f-88a5-bb0c71b6008d') = uuid;
SELECT * FROM crm_layouts where crm_configuration_id = 39;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
# lead_id
# account_id 177
# contact_id 3969
# opportunity_id
# stage_id 203
SELECT * FROM opportunities WHERE opportunities.crm_configuration_id = id = 282;
SELECT * FROM activities where crm_configuration_id = 39 AND type = 'conference'
AND user_id = 143 and actual_start_time >= '2025-10-13';
SELECT * FROM activities a
# JOIN opportunities o ON a.opportunity_id = o.id
WHERE a.crm_configuration_id = 39 AND a.type = 'conference'
and status = 'completed' and recording_state = 'recorded'
and a.actual_start_time >= '2025-10-13'
AND a.user_id = 143
;
select * from leads
where crm_configuration_id = 39; # 112 -> ac. 178, 109 => op. 1707
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310,407509,407375,356001,356008);
SELECT * FROM activities WHERE id IN (356013,616188,616202,616310);
SELECT * FROM activities WHERE id IN (407509,407375); # leads: 112, 109 | status - 198
SELECT * FROM activities WHERE id IN (356001, 356008); # contacts:
SELECT * FROM opportunities WHERE id IN (1707);
SELECT * FROM stages where id IN (204, 198);
SELECT * FROM opportunities WHERE account_id IN (178);
SELECT * FROM opportunities WHERE crm_configuration_id = 39 AND created_at > '2025-01-01';
SELECT * FROM contacts WHERE account_id IN (178); # 4118 Musaibe, 4448 Ceco Personal
SELECT * FROM activities where crm_configuration_id = 39
AND opportunity_id IS NULL
AND is_internal = false
and status = 'completed' and recording_state = 'recorded'
AND actual_start_time >= '2025-10-13'
AND (lead_id IS NOT NULL OR contact_id IS NOT NULL OR account_id IS NOT NULL)
# AND lead_id IN (112, 109)
;
SELECT * FROM crm_profiles WHERE user_id = 143;
select * from inboxes; # 212
select * from users where id = 143; # 143
select * from inbox_email_batches where inbox_id = 212
and updated_at >= '2026-01-28 00:00:00' order by id desc;
select * from inbox_emails where inbox_id = 212
and batch_id = 95885 order by id desc;
select * from email_messages where origin_user_id = 143;
select * from activities where user_id = 143 and updated_at >= '2026-01-28 00:00:00';
select * from participants where activity_id = 620247;
select * from crm_profiles where user_id = 143;
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid; # 356001
select * from transcription where activity_id = 356001; # 6943
select * from ai_prompts where transcription_id = 6943;
SELECT * FROM activity_summary_logs where activity_id = 356001;
SELECT * FROM social_accounts WHERE sociable_id = 143;
# [PASSWORD_DOTS]
SELECT * FROM activities WHERE uuid_to_bin('0164a4fb-cb95-454e-9edd-4d804e4999bd') = uuid;
# 422515 softphone tr. 8100
SELECT * FROM activities WHERE uuid_to_bin('7520add8-8d87-41a5-98e5-fc4edf96f21e') = uuid;
# 407509 conference tr. 7670 crmId: 00UD1000002J9aTMAS
select * from ai_prompts where transcription_id IN (8100, 7670);
select * from activity_summary_logs where activity_id = 407509;
select * from sidekick_settings;
select * from default_activity_types;
SELECT * FROM contacts WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM leads WHERE crm_configuration_id = 39 and email = '[EMAIL]';
SELECT * FROM activity_searches where user_id = 143;
SELECT * FROM groups where team_id = 1;
select * from teams where id = 1;
select * from groups where team_id = 1; # 1150 - 7e75f8025c22
select id, name, group_id, status, deleted_at, email
from users where team_id = 1 order by group_id desc ;
select * from activity_searches where id in (1977, 1978, 1979);
select * from activity_search_filters where activity_search_id IN (1977, 1978, 1979);
select * from activity_search_filters where filter = 'group_id' and value = '443f26b8-8512-437e-a9f9-7e75f8025c22'; # 10268, 10272, 10277
select * from nudges where activity_search_id IN (1977, 1978, 1979); # 877, 878, 879
INSERT INTO `activity_search_filters`
(`activity_search_id`, `filter`, `value`) VALUES
(1977, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1978, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22'),
(1979, 'group_id', '443f26b8-8512-437e-a9f9-7e75f8025c22')
;
select * from crm_configurations where id = 39;
select sa.* from users u JOIN social_accounts sa on u.id = sa.sociable_id
where u.team_id = 1;
SELECT * FROM social_accounts WHERE sociable_id = 1635;
SELECT * FROM users WHERE id = 1635;
select * from teams where id = 1;
select * from users where team_id = 1;
select * from team_features where team_id = 1;
select * from features;
SELECT * FROM activity_searches where id = 1982; # 1981
SELECT * FROM activity_search_filters WHERE activity_search_id = 1982;
SELECT * FROM activities WHERE uuid_to_bin('e916569b-086c-4bd1-94d7-5e3802c27ccf') = uuid;
SELECT * FROM groups WHERE id = 1439;
SELECT * FROM users WHERE group_id = 1439;
select * from permissions; # 158
select * from roles;
select * from permission_role;
select * from teams where id = 1;
select * from groups g JOIN playbooks p on g.playbook_id = p.id where g.team_id = 1;
select * from groups where id = 28;
select * from playbooks where team_id = 1;
select * from playbooks where id = 179;
select * from playbook_categories where id = 1391;
select * from users where id = 143;
select * from crm_profiles where user_id = 143;
select * from activities where crm_configuration_id = 39 and type = 'conference'
and crm_provider_id IS NOT NULL ORDER by id desc;
select * from activities where id = 422003; # 00UO400000pB6fpMAC
SELECT ar.id, ar.uuid, ar.media_type, ar.status, a.type
FROM automated_report_results ar
JOIN automated_reports a ON a.id = ar.report_id
WHERE a.type = 'ask_jiminny'
LIMIT 10;
SELECT * FROM automated_reports where id = 71;
SELECT * FROM automated_report_results where report_id = 71;
UPDATE automated_reports set playbook_categories = NULL where id = 68;
SELECT * FROM automated_report_results where id = 275;
SELECT * FROM automated_reports order by id desc;
SELECT * FROM automated_report_results order by id desc;
select * from activity_searches where user_id = 143;
select * from ask_anything_prompts;
SELECT `automated_report_results`.* FROM `automated_report_results`
INNER JOIN `automated_reports`
ON `automated_report_results`.`report_id` = `automated_reports`.`id`
WHERE 1=1
AND `automated_report_results`.`generated_at` IS NOT NULL
# AND `automated_report_results`.`sent_at` IS NOT NULL
AND `automated_reports`.`team_id` = 1
AND JSON_CONTAINS(`automated_reports`.`recipients`, 143, '$."users"')
;
SELECT * FROM automated_reports where id = 67;
SELECT * FROM automated_reports where id = 42;
SELECT * FROM users WHERE id = 143; # group 28
select * from teams where id = 3143;
select * from crm_configurations where id = 500;
select * from users where name = 'Integration Account'; # 1695
SELECT * FROM social_accounts WHERE sociable_id = 1695;
select * from activities where crm_configuration_id = 39
and recording_state = 'recorded' and duration > 60
and status = 'completed' and actual_start_time >= '2025-12-01';
SELECT * FROM activities WHERE uuid_to_bin('458cf915-b914-4000-b083-5687b32b2956') = uuid;
select * from leads;
SELECT * FROM activities WHERE uuid_to_bin('f43cf158-e60d-46e5-92f8-c4e0594a3219') = uuid; # 422003
SELECT * FROM activities WHERE id IN (16,422003);
SELECT * FROM activities where status = 'failed';
SELECT * FROM tracks WHERE activity_id = 422003;
SELECT
a.*
FROM activities a
JOIN users u ON a.user_id = u.id
WHERE
a.status = 'completed'
AND uuid_to_bin('641f1acb-16b8-42d1-8726-df52979dad0e') = u.uuid
AND a.deleted_at IS NULL
AND EXISTS (
SELECT 1 FROM tracks t
WHERE t.activity_id = a.id
AND t.type IN ('audio', 'video')
)
ORDER BY a.actual_start_time DESC
LIMIT 25;
select * from teams where id = 19;
select * from crm_configurations where provider = 'pipedrive';
SELECT
CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN ' (owner)' ELSE '' END) AS user_id,
u.email,
sa.*,
t.owner_id FROM social_accounts sa
JOIN users u on u.id = sa.sociable_id
JOIN teams t on t.id = u.team_id
WHERE u.team_id = 19 and sa.provider = 'pipedrive';
SELECT * FROM social_accounts WHERE id = 1116;
UPDATE social_accounts SET provider_user_token = 'v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA',
provider_refresh_token = '5034113:[TELEGRAM_TOKEN]b2bfc',
expires = 1779091997,
state = 'connected'
WHERE id = 1116;
"provider_user_token": "v1u:AQIBAHj-LzTNK2yuuuaLqifzhWb9crUNKTpk4FlQ9rjnXqp_6AEQhDhDQVa1nvWCHEvnpvSEAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMnG8KNcZLIjEnlRPxAgEQgDsGPIcKjsMU7Qel36BtM5FCQa56mYUy24_AAoqd12yjVFkq6egLqS0inp-5G4JE7frJURMV8VTw_fY14g:rYyABXmXsBhEdYU_dfmDH8GF-vzSseJXE5bds_zAyVdAwlTXOPdTl9i4PS4jVofLvpq7IRgvEt2BzGhR6cWiQXHHD0AtayQOkZm262ClFCsMYtKGfep0Jq1n0eiRIVqT9gAY7rWvhpEDF8oAlgnRGmqx-euIkpzE79sPXh4OjNx_yUIaanjyplGpBBJ_NiACd1sMlZmseyUyyU_gldqlCBAuK9hhATc9icgg7zuoc7nKBBrlg49tRtzEagDh6xbFBpzfCp7kE_7n4TLWfWHLPMzu-bktjwA969G9sFRmoH1GjPA0a2odDT4dk1_1ouBrB1NcTT2hQUqH-_RzDW2nWmeoVHA",
"provider_refresh_token": "5034113:[TELEGRAM_TOKEN]b2bfc",
"expires": 1779091997,
select * from crm_field_values;
select * from crm_fields where type = 'multi-picklist';
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a0f-44c5a849d65c') = uuid;
SELECT * FROM crm_layout_entities WHERE crm_layout_id = 282;
SELECT * FROM crm_fields WHERE id = 3014; # 1885
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project
New File or Directory…
Expand Selected
Collapse All
Options
Hide...
|
79376
|
NULL
|
NULL
|
NULL
|
|
79380
|
2785
|
40
|
2026-05-28T06:26:46.570503+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949606570_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","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.8374335,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"TextRelayServiceTest","depth":6,"bounds":{"left":0.85272604,"top":0.019952115,"width":0.062832445,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Run 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9155585,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Debug 'TextRelayServiceTest'","depth":6,"bounds":{"left":0.9268617,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"More Actions","depth":6,"bounds":{"left":0.9381649,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JetBrains AI","depth":5,"bounds":{"left":0.96609044,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"Search Everywhere","depth":5,"bounds":{"left":0.9773936,"top":0.019952115,"width":0.011303191,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"IDE and Project Settings","depth":5,"bounds":{"left":0.9886968,"top":0.019952115,"width":0.011303186,"height":0.025538707},"on_screen":true,"role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
7923424182753190895
|
-8780372176425246254
|
click
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
Start Listening for PHP Debug Connections
TextRelayServiceTest
Run 'TextRelayServiceTest'
Debug 'TextRelayServiceTest'
More Actions
JetBrains AI
Search Everywhere
IDE and Project Settings
rnpstomViewCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaProinet v© SyncMailbox.php2 test.pyTextRelayServiceTest.phpPyyminny.on.env.productionUnaded Uragkam.xmisvetur.config.isM+WEBHOOK_FILTERING._IMPLEMENTAT> (h Exteral Librariesv EScratches and Consolesclass Field extends Modelv Database ConsolesV AEUconsolezADEAL RISKS (EU"AEU TEUTvminntodnoconsolelliminnyocoowtiiminny @locainos4 HSJJocal jiminny@localhost)A SF jiminny@localhost)A zoho_dev (iminny@localhost)V & PRODconcnle lpeonServicht+.@cv E DatabaseV AEconsolevlttinnwooetos%SF 8 gAHS localchmbieos7VPRODconsoleSTAGING& consoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoing TYPE CURRENCYoublic const stoing TYPE BOOLEANoub dic const strind thpe textoub1e const stoino TYPE TEXTAREABQutotfiR liminmw.crm lavout. entitios x Tx.OTMRW9rowsSe1dmuuid (uuro with tireclon and tinechich sranned) 7012 A104chal-21ha-1046.0187-256653C07884933 54415f8f-9f84-435d-9b6a-2fa8e178ce61934 002c9d01-4deS-4bb9-9a97-15221485a95c935 da3f8bdS-639a-4263-a8e3-c98aß15f48eb96 9880544-[CREDIT_CARD]-8erat740Ory Lonwnhs-dan:e noreshseyocthtORR 25CHS61d-d6h6.1797-3/50.Ac67750712211790 c2055646-fSS2-46b1-8689-9200f156cc3c1789 33579656-6686-4a8a-aBec-5363ebe861b2Tho Huncnoll nhhin hac hoon Honro gtAh, Hưh i tro Mht Hớithhha Hnghrnn, Mhi Gah catolu uun ngtáll Huncholl wảiMockeriitTEWEAVcustonlio"sravelloSF (iminny@localhost) xun crm.fieids jiminnyblocalhost)# HS Jocal jiminny@tocalhost# console lPeonA console (EU]271274= 276A console [STAGING)provider_user_token": "vlu:AQJBAHj-L2.NK2yuuuaLqifzhab9crUNK1pk4F1Q9rjnXqp_6AEQhDh0QVa1nviCHEvnpvstAAAAt08889kqnk1bYwU88w89orowiiden retroch token". "sexck.1osssyk1.8rciLy8.8c81308221676091154684404666626f6"exorires": 1779891997flect * fron crm_field_values:Mect + tron em selds whene tyne n inul trenickbistteELECT * FROM crm layouts WHERE uuid to bin(*7c327871-fc25-4c56-9a0f-44c5a849d65c') • uuid:ELECT * FROM crm layout entities WHERE crn layout id = 282: 8sELECT * FROM crm fields WHERE 1d = 3014; # 1885ELECT * FROM crm field values WHERE crn field 1d = 3814Thu 28 May 9:26:46TextRelayServiceTesteeendhrner hensewiet+0.can I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXT HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# eu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lM bashACk amwiningt+ < CodoAdhotivde cra layoutid ya marenteni toLcrn field a m287282282287292282cnull:cnull932932OKy.93y.utahecnuis actvstvesuenamy<null> follow-ud1879 <null21880 <null>882 cnullsRRk coinhJRRS conll1943 Location1984 OutcomedescriptionActivity SumnaryNext Steps..<null>cnull>cnulsconllsCall Outconddefault_value YMusmandarory<null»<null><null>cnullcnulcoinhsconllssnull:coultsIm cead only"senuenceonparedat8 2822-12-15 14:53:031 2822-12-15 14:53:058 2822-12-15 14:53:0112822-12-15 14:53:012 2822-12-15 14:53:093 2822-12-15 14:53:834 2022-12-15 14:53:096 2023-82-15 17:02:55 2823-82-15 17:02:31alundatedta2022-12-15 142022-12-15 142022-12-15 142822-12-15 142822-12-15 12000-12-15 12AOX-AN-46122023-02-15 17SUM:0 9:8 WWindsurt Teams 274:25Aensno....
|
79378
|
NULL
|
NULL
|
NULL
|
|
79402
|
2784
|
62
|
2026-05-28T06:28:24.644084+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949704644_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp‹$0DOCKER₴81DEV (docker)₴2-zsh-zshscreenpipe"7584-zsh*5100% <478•Thu 28 May 9:28:24181...ip-10-30-129-190:~ (nc)₴86...-10-30-140-255:~ (-zsh)$7Fixed 0 of 5697 files in 55.554 seconds, 799.06 MBmemory usedDetected deprecations in use (they will stop working in next major release):Rule set"@PHP74Migration"is deprecated.Use"@PHP7x4Migration"instead.- Rule set "@PHP80Migration"is deprecated.Use "@PHP8x0Migration"instead.Rule set "@PHP81Migration" is deprecated. Use "@PHP8x1Migration"instead.Rule set "@PHP82Migration" is deprecated. Use "@PHP8x2Migration" instead.Rule set "@PHP83Migration" is deprecated.Use"@PHP8x3Migration" instead.Rule set "@PHP84Migration" is deprecated.Use "@PHP8x4Migration" instead.What's next:Try Docker Debug for seamless, persistent debugging tools in any container or image docker debug docker_lamp_1Learn more at [URL_WITH_CREDENTIALS] ~/jiminny/app (JY-20915-fix-strict-casting-text-relay-service) $ co masterM.env.localMapp/Console/Commands/JiminnyDebugCommand.phpconfig/logging.phpSwitched to branch'master'Your branch is up to date with 'origin/master'lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ git pullremote: Enumerating objects: 97,done.remote: Countingobjects: 100% (97/97),done.remote: Compressing objects: 100% (27/27), done.remote: Total 97 (delta 69), reused 95 (delta 69), pack-reused 0 (from 0)Unpacking objects: 100% (97/97), 14.08 KiB | 150.00 KiB/s, done.From github.com:jiminny/appf1ccf9be50..890e429206master-> origin/masterce9abde868..3800efb7ea JY-20905-tool-search-members-> origin/JY-20905-tool-search-membersad6ace97b9..b3659b1290JY-20910-schedule-parallel-update-target-processing -> origin/JY-20910-schedule-parallel-update-target-processingUpdating f1ccf9be50..890e429206Fast-forwardapp/Services/Mail/TextRelayService.php6tests/Unit/Services/Mail/TextRelayServiceTest.php1132 files changed, 14 insertions(+),5 deletions(-)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ co -b JY-20915-fix-missing-header-text-relaySwitched to a new branch 'JY-20915-fix-missing-header-text-relay'Lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20915-fix-missing-header-text-relay) $D...
|
NULL
|
-8273652212264898939
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp‹$0DOCKER₴81DEV (docker)₴2-zsh-zshscreenpipe"7584-zsh*5100% <478•Thu 28 May 9:28:24181...ip-10-30-129-190:~ (nc)₴86...-10-30-140-255:~ (-zsh)$7Fixed 0 of 5697 files in 55.554 seconds, 799.06 MBmemory usedDetected deprecations in use (they will stop working in next major release):Rule set"@PHP74Migration"is deprecated.Use"@PHP7x4Migration"instead.- Rule set "@PHP80Migration"is deprecated.Use "@PHP8x0Migration"instead.Rule set "@PHP81Migration" is deprecated. Use "@PHP8x1Migration"instead.Rule set "@PHP82Migration" is deprecated. Use "@PHP8x2Migration" instead.Rule set "@PHP83Migration" is deprecated.Use"@PHP8x3Migration" instead.Rule set "@PHP84Migration" is deprecated.Use "@PHP8x4Migration" instead.What's next:Try Docker Debug for seamless, persistent debugging tools in any container or image docker debug docker_lamp_1Learn more at [URL_WITH_CREDENTIALS] ~/jiminny/app (JY-20915-fix-strict-casting-text-relay-service) $ co masterM.env.localMapp/Console/Commands/JiminnyDebugCommand.phpconfig/logging.phpSwitched to branch'master'Your branch is up to date with 'origin/master'lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ git pullremote: Enumerating objects: 97,done.remote: Countingobjects: 100% (97/97),done.remote: Compressing objects: 100% (27/27), done.remote: Total 97 (delta 69), reused 95 (delta 69), pack-reused 0 (from 0)Unpacking objects: 100% (97/97), 14.08 KiB | 150.00 KiB/s, done.From github.com:jiminny/appf1ccf9be50..890e429206master-> origin/masterce9abde868..3800efb7ea JY-20905-tool-search-members-> origin/JY-20905-tool-search-membersad6ace97b9..b3659b1290JY-20910-schedule-parallel-update-target-processing -> origin/JY-20910-schedule-parallel-update-target-processingUpdating f1ccf9be50..890e429206Fast-forwardapp/Services/Mail/TextRelayService.php6tests/Unit/Services/Mail/TextRelayServiceTest.php1132 files changed, 14 insertions(+),5 deletions(-)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ co -b JY-20915-fix-missing-header-text-relaySwitched to a new branch 'JY-20915-fix-missing-header-text-relay'Lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20915-fix-missing-header-text-relay) $D...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79403
|
2785
|
52
|
2026-05-28T06:28:24.752193+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949704752_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rnpstomViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915 rnpstomViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-rolaProinet vKerodloh© SyncMailbox.php2 test.pyTextRelayServiceTest.phpPyyminny.on3.env.productionUnaded Uragkam.xmisvetur.confia.iM+WEBHOOK_FILTERING._IMPLEMENTATclass Field extends Model→10 extemal Lioraniesv EScratches and Consolesv Database ConsolesV AEUconsolezADEAL RISKS (EU"AEU TEUTvminnwoehoconsolelliminnyocooftiiminny @locainos4 HSJJocal jiminny@localhost)A SF jiminny@localhost)A zoho_dev (iminny@localhost)V & PRODconcnle lpeonServicht+.OCv E DatabaseV AEconsolevlttinnwooetos4, SFAHSllocalAPRODconsoleASTAGINGconsoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoing TYPE CURRENCYoublie const stoing TYPE BOOLEANoub1e const stoino TYPE TEXTAREABQutoti liminoy.crm lavout entitiosMRW9rowsSe1dmuuid (uuro with tireclon and tinechich sranned) 7012 A104chal-21ha-1046.0187-256653C07884933 54415f8f-9f84-435d-9b6a-2fa8e178ce61934 002c9d01-4deS-4bb9-9a97-15221485a95c935 da3f8bdS-639a-4263-a8e3-c98aß15f48eb96 9880544-[CREDIT_CARD]-8erat740Ory NohYWnhs-donienroreRhseyyoctyht1790 c2055646-fSS2-46b1-8689-9200f156cc3d1780 Z7C90KG6-Ahah-laRacs8on.CRAZohoRA1h2938 7556561d-d46f-4783-a45e-8cf7359312c1lTho Huncnoll nmin hac haon HonroMockeriitTEWEAV273274= 276customioaravelioSF (iminny@localhost) xHSJocal jiminny@blocalhost)# console pron# console FulA console (STAGINGTeAuto vprovider_user_token": "vlu:AQ.BAHj-L2.NK2yuuuaLqifzhab9crUNK1pk4F109rjnXqp_6AEQh0hDQVa1nviCHEvnpvstAAAAtJ888gkqnkzbYwU88w89"provider_refresh_token": "5834113:[TELEGRAM_TOKEN]b2bfc*,"expires": 1779891997,flect * fron crm_field_values:Mect + tron em selds whene tyne n inul trenickbistteELECT * FROM crm layouts WHERE uuid to bin(*7c327871-fc25-4c56-9a0f-44c5a849d65c') • uuid:iculs thon ciutoyoue trecaes wncke chi coyouedu a cocELECT * FROM crm fields WHERE 1d = 3014; # 1885ELECT * FROM crm field values WHERE crn field 1d = 3814o crm_ layout id 7a marenteni toMusmandaroryThu 28 May 9:28:24TextRelayServiceTesteeesdarner hensewietcan I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXT HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.comaeu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lM bashACk amwiningt+ <> CodeAdhotivIm cead only"287282282287292282282cnull:cnull932932OKy.93y.Lcrn field a mutahedescriptioncnuis actvstvesuenamyActivity Sumnary<null> follow-ud1879 <null21880 cnull:882 cnullsRRk coinh10/R locstionnoel durcont3014 cnullsNext Steps..snullcnull>cnulsComhsCall Outcontdefault_value Ycnull<null><null>cnullcnulcoinhssnull:snull:coultesenuencewonpatedat8 2822-12-15 14:53:031 2822-12-15 14:53:058 2822-12-15 14:53:0112822-12-15 14:53:012 2822-12-15 14:53:096 2023-82-15 17:02:5S 2023-82-15 17:02:34 2822-12-15 14:53:09alundatedta2022-12-15 142022-12-15 142022-12-15 142822-12-15 142822-12-15 12022-A0-15 122AOX-AN-46122022-12-15 14SUM: 282 9:3 WWindsurt Teams 274:23 UTF-8 4 space-...
|
NULL
|
-8634704173128743292
|
NULL
|
click
|
ocr
|
NULL
|
rnpstomViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915 rnpstomViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-rolaProinet vKerodloh© SyncMailbox.php2 test.pyTextRelayServiceTest.phpPyyminny.on3.env.productionUnaded Uragkam.xmisvetur.confia.iM+WEBHOOK_FILTERING._IMPLEMENTATclass Field extends Model→10 extemal Lioraniesv EScratches and Consolesv Database ConsolesV AEUconsolezADEAL RISKS (EU"AEU TEUTvminnwoehoconsolelliminnyocooftiiminny @locainos4 HSJJocal jiminny@localhost)A SF jiminny@localhost)A zoho_dev (iminny@localhost)V & PRODconcnle lpeonServicht+.OCv E DatabaseV AEconsolevlttinnwooetos4, SFAHSllocalAPRODconsoleASTAGINGconsoleDockerpublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;public const int DESCRIPTION MAX LENGTH = 191:public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeooublic const string TYPE_PERCENToublic const string TYPE_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoing TYPE CURRENCYoublie const stoing TYPE BOOLEANoub1e const stoino TYPE TEXTAREABQutoti liminoy.crm lavout entitiosMRW9rowsSe1dmuuid (uuro with tireclon and tinechich sranned) 7012 A104chal-21ha-1046.0187-256653C07884933 54415f8f-9f84-435d-9b6a-2fa8e178ce61934 002c9d01-4deS-4bb9-9a97-15221485a95c935 da3f8bdS-639a-4263-a8e3-c98aß15f48eb96 9880544-[CREDIT_CARD]-8erat740Ory NohYWnhs-donienroreRhseyyoctyht1790 c2055646-fSS2-46b1-8689-9200f156cc3d1780 Z7C90KG6-Ahah-laRacs8on.CRAZohoRA1h2938 7556561d-d46f-4783-a45e-8cf7359312c1lTho Huncnoll nmin hac haon HonroMockeriitTEWEAV273274= 276customioaravelioSF (iminny@localhost) xHSJocal jiminny@blocalhost)# console pron# console FulA console (STAGINGTeAuto vprovider_user_token": "vlu:AQ.BAHj-L2.NK2yuuuaLqifzhab9crUNK1pk4F109rjnXqp_6AEQh0hDQVa1nviCHEvnpvstAAAAtJ888gkqnkzbYwU88w89"provider_refresh_token": "5834113:[TELEGRAM_TOKEN]b2bfc*,"expires": 1779891997,flect * fron crm_field_values:Mect + tron em selds whene tyne n inul trenickbistteELECT * FROM crm layouts WHERE uuid to bin(*7c327871-fc25-4c56-9a0f-44c5a849d65c') • uuid:iculs thon ciutoyoue trecaes wncke chi coyouedu a cocELECT * FROM crm fields WHERE 1d = 3014; # 1885ELECT * FROM crm field values WHERE crn field 1d = 3814o crm_ layout id 7a marenteni toMusmandaroryThu 28 May 9:28:24TextRelayServiceTesteeesdarner hensewietcan I test it locally first. if I place env from stagingYes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingGOOGLE TEXTUSERECOOGLE TEXT HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.comaeu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lM bashACk amwiningt+ <> CodeAdhotivIm cead only"287282282287292282282cnull:cnull932932OKy.93y.Lcrn field a mutahedescriptioncnuis actvstvesuenamyActivity Sumnary<null> follow-ud1879 <null21880 cnull:882 cnullsRRk coinh10/R locstionnoel durcont3014 cnullsNext Steps..snullcnull>cnulsComhsCall Outcontdefault_value Ycnull<null><null>cnullcnulcoinhssnull:snull:coultesenuencewonpatedat8 2822-12-15 14:53:031 2822-12-15 14:53:058 2822-12-15 14:53:0112822-12-15 14:53:012 2822-12-15 14:53:096 2023-82-15 17:02:5S 2023-82-15 17:02:34 2822-12-15 14:53:09alundatedta2022-12-15 142022-12-15 142022-12-15 142822-12-15 142822-12-15 12022-A0-15 122AOX-AN-46122022-12-15 14SUM: 282 9:3 WWindsurt Teams 274:23 UTF-8 4 space-...
|
79401
|
NULL
|
NULL
|
NULL
|
|
79404
|
2784
|
63
|
2026-05-28T06:28:26.944950+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949706944_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
8043719072324535154
|
-8628527368849355612
|
typing_pause
|
hybrid
|
NULL
|
Project: faVsco.js, menu
iTerm2ShellEditViewSessio Project: faVsco.js, menu
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp‹$0-zshDOCKER₴81DEV (docker)₴2-zshffmpeg884-zsh*5100% <78•Thu 28 May 9:28:26181...ip-10-30-129-190:~ (nc)₴86...-10-30-140-255:~ (-zsh)$7Fixed 0 of 5697 files in 55.554 seconds, 799.06 MBmemory usedDetected deprecations in use (they will stop working in next major release):Rule set"@PHP74Migration"is deprecated.Use"@PHP7x4Migration"instead.- Rule set "@PHP80Migration"is deprecated.Use "@PHP8x0Migration"instead.Rule set "@PHP81Migration" is deprecated. Use "@PHP8x1Migration"instead.Rule set "@PHP82Migration" is deprecated. Use "@PHP8x2Migration" instead.Rule set "@PHP83Migration" is deprecated.Use"@PHP8x3Migration" instead.Rule set "@PHP84Migration" is deprecated.Use "@PHP8x4Migration" instead.What's next:Try Docker Debug for seamless, persistent debugging tools in any container or image docker debug docker_lamp_1Learn more at [URL_WITH_CREDENTIALS] ~/jiminny/app (JY-20915-fix-strict-casting-text-relay-service) $ co masterM.env.localMapp/Console/Commands/JiminnyDebugCommand.phpconfig/logging.phpSwitched to branch'master'Your branch is up to date with 'origin/master'lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ git pullremote: Enumerating objects: 97,done.remote: Countingobjects: 100% (97/97),done.remote: Compressing objects: 100% (27/27), done.remote: Total 97 (delta 69), reused 95 (delta 69), pack-reused 0 (from 0)Unpacking objects: 100% (97/97), 14.08 KiB | 150.00 KiB/s, done.From github.com:jiminny/appf1ccf9be50..890e429206master-> origin/masterce9abde868..3800efb7ea JY-20905-tool-search-members-> origin/JY-20905-tool-search-membersad6ace97b9..b3659b1290JY-20910-schedule-parallel-update-target-processing -> origin/JY-20910-schedule-parallel-update-target-processingUpdating f1ccf9be50..890e429206Fast-forwardapp/Services/Mail/TextRelayService.php6tests/Unit/Services/Mail/TextRelayServiceTest.php1132 files changed, 14 insertions(+),5 deletions(-)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (master) $ co -b JY-20915-fix-missing-header-text-relaySwitched to a new branch 'JY-20915-fix-missing-header-text-relay'Lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/jiminny/app (JY-20915-fix-missing-header-text-relay) $D...
|
79402
|
NULL
|
NULL
|
NULL
|
|
79405
|
2785
|
53
|
2026-05-28T06:28:28.353616+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949708353_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu...
|
[{"role":"AXButton","text" [{"role":"AXButton","text":"Project: faVsco.js, menu","depth":5,"bounds":{"left":0.025930852,"top":0.019952115,"width":0.03856383,"height":0.025538707},"on_screen":true,"help_text":"~/jiminny/app","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXButton","text":"JY-20915-fix-missing-header-text-relay, menu","depth":5,"bounds":{"left":0.064494684,"top":0.019952115,"width":0.09740692,"height":0.025538707},"on_screen":true,"help_text":"Git Branch: JY-20915-fix-missing-header-text-relay","role_description":"button","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false}]...
|
-3150964534923304660
|
-4304507549388960332
|
visual_change
|
hybrid
|
NULL
|
Project: faVsco.js, menu
JY-20915-fix-missing-head Project: faVsco.js, menu
JY-20915-fix-missing-header-text-relay, menu
PhpStormViewCoocTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-misProinet v© SyncMailbox.phpMockeriit2 test.pyTextRelayServiceTest.phpfyyminny.oho3.env.productionUnuded Uractam.xmniEs vetur.confialeM+WEBHOOK_FILTERING._IMPLEMENTATclass Field extends Model→10 extemal Lioraniesv EScratches and Consolespublic const int NAME_MAX_LENGTH = 128;public const int LABEL_MAX_LENGTH = 255;v Database Consoles8 090:0880 c0public const int DESCRIPTION MAX LENGTH = 191:consolezulADEAL RISKS (EU"public const string TYPE_MULTIPICKLIST = "nulti-picklist':Norye SUODONeoytminnwoohooublic const string TYPE_PERCENTconsolelliminnyocooftiiminny @locainosoublic const string TYPE_PICKLIST4 HSJJocal jiminny@localhost)Ss timinny@localnoshoubiac const stoind TYpE NunsERA zoho_dev (iminny@localhost)oubiaic const stoina TYPEPURRENaYoublie const stoing TYPE BOOLEAN• "oicklist':= "nunber';"currency": "boolean':V & PROD"textconcnle lpeonoub1e const stoino TYPE TEXTAREAServicht+@C0*Qutoui liminoy.com ticics XTx.v E DatabaseV AEW1rowvgom+TcArto#QREAOconsole0 1d391/vlttinnwoloetosASE 772 mAHSllocalAPRODmuuid (UUID with time-low and tine-high swapped))a3d3dfSa-eaa1-43d8-b95e-1ff4bec8c428At crn.configuration_idcrn.provideriooicktestnutcconsoleASTAGINGErabelloscktestnultconsoleldacentotonComilDockertype(B Lengthmulti-picklist48991D default valueADlobfect tyoeunbis serectablis nandatoryAmis filterableAD is indexable1B crcated.at2823-87-25 01-80-27Mupdated.at2826-82-16 11-01-16Muis readontyTEWEAVS000%LXTno Lo moy SizoizeTextRelayServiceTestcustom.logaraveliosSF (iminny@localhost) x HS Jocal (jminny@alocalhost)# console prons consoe leu.A console (STAGINGaer henseict+0.De00Tc AutoyDo jminnycan I test it locally first. if I place env from stagingprovider_user_token": "vlu:AQ.BAHj-L2.NK2yuuuaLqifzhab9crUNK1pk4F109rjnXqp_6AEQh0hDQVa1nviCHEvnpvstAAAAtJ888gkqnkzbYwU88w89"provider_refresh_token": "5834113:[TELEGRAM_TOKEN]b2bfc*,"exorires": 1779891992Yes, The service relies on a tew thinas vou'd need in olace1. Credentials file The constructor expects storage/text-relay.ison (a Google service account JSON key file)Gmbtrom sthaind and oince it there2. .env values to copy from stagingflect * fron crm_field_values:ilect * fron crn fields where type = "nulti-picklist':ELECT * FROM crm layouts WHERE uuid to bin(*7c327871-fc25-4c56-9a0f-44c5a849d65c') • uuid:ELECT * FROM crm layout entities WHERE crn layout id = 282:LECT * FROM crm Flelds WHERE id = 3014; # 1885ELECT * FROM crm field values WHERE crn field 1d = 3814GOOGLE TEXTUSERECOOGLE TEXTI HASTGOOGLE TEXT RELAY TOPIC:DEPLOY REGION:the cnail mailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.com# the Pub/Sub topic nameeu or us3. Run the svnc manualiv vin tinker tinside docker 1ae 10lAck amwinino t<CodeAdhotiv24→0raw rotriouod ctartina tram n 60K me loydatinh 20 ma thnhing 676 maNX M Maud Tosme 27610 lITS.9ensAo....
|
NULL
|
NULL
|
NULL
|
NULL
|