|
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
|
|
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
|
|
79364
|
2785
|
32
|
2026-05-28T06:26:22.491779+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949582491_m2.jpg...
|
PhpStorm
|
faVsco.js – crm_fields [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:...
|
[{"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}]...
|
-147301692555525249
|
-8776298399911410750
|
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:
PhpStormViewNeweNNCCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaProinet vcKerosoh© SyncMailbox.phpEinfection ison distTextRelayServiceTest.phpfyyminny.oho3.env.productionMAINSTAIMclass Field extends ModelMANiSPNAwERtosanemajiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml1% raw.salquery.salM: 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 AEconsoleAliminnyelocalhost4SF 1 $ 749 mschmeneostosyaVPRODconsoleSTAGING2 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 TEXTAREAS0TextRelayServiceTestThu 28 May 9:26:21MockeriitEWEAV=custom.logsravelloSF (iminny@localhost)A console (EU]A console [STAGING"оut-sgtTE ARO MNAHERE 10 = 7885=•OROER 8un crm.fields (jiminnytalocalhost) x# HS Jocal jiminny@tocalhostconsole (PROD)DOLLEOgeCSVVLLDOeaner 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 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 us3. Run the svnc manualiv vin tinker tinside docker 1aeo 10lM bashAck amwinino t+ < Codh EAdnotivTho Huncnoll ninin hac hoonWindcud Tosm....
|
79363
|
NULL
|
NULL
|
NULL
|
|
79363
|
2785
|
31
|
2026-05-28T06:26:19.965344+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949579965_m2.jpg...
|
PhpStorm
|
faVsco.js – crm_fields [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
rapstomViewNeweNNCCoocKetucioTOOI-WindowFV faVsco. rapstomViewNeweNNCCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaproidetKeroaioh.© SyncMaibox.phpEinfection ison disTextRelayServiceTest.phpMENSTAmMANISRNAWERHOsanemajiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM+README.mdô sonar-proiect propertiesE testpySUn tieo aciam-xmiis vetur.confialisM. WEBHOOK FILTERNG-MPLEMENTAT> h Extemal Librariesv E Scratches and ConsolesServicht+.@cv E DatabaseV AEconsolevlttinnwoloetosASF 1s749APRODconsoleASTAGINGconsoleDockerPyyminny.on3.env.productionclass Field extends Modelpublic 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_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoind TYPE CURRENYoublic const stoing TYPE BOOLEANoub1e const stoino TYPE TEXTAREAQutoti liminoy.crm lavout entitiesMRW 9rowsd =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:c norerhsewroetht938 75SbSf1d-dfbf-4783-a4Se-8cf7359312c1790 c205S646-fSS2-46b1-8689-9200f156cc3g1789 3357965f-6b86-4a8a-a8ec-5363ebe861b2Tho Huncnoll nhhin hac Hoon H.MockeriitEWEAV=custom.loglaravel.logSF (iminny@localhost) xHS.Jocal jiminny@blocalhost)# console pron# consolefFulA console (STAGINGTeAuto v"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 layoutamIZ parent entity id ?oeonsedsohTOOУLYThu 28 May 9:26:19TextRelayServiceTesteeendhrner 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 TEXTUSERECAOGLE TEXT 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 aminingt<CodeAdhotive1s_vis1ble 1meadoniv282282282282282282282cnull<null>932932932932932coulls act vtyesunnary<null> follow-up1879 <nulle1880 cnulle1882 <null:u:: nult1885 <null1943 Location1984 OutconeldesemeietoniActivity SunnaryNext Steps….cnulaconllsCall Outcon.@ default_value Vwus mandarorycoulls<null><null>cnull<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:091782010115-14:5348542029.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 1GIM:1906 76M Maur Tosme 27Aen liTe9 ensno....
|
NULL
|
4814339132299611197
|
NULL
|
typing_pause
|
ocr
|
NULL
|
rapstomViewNeweNNCCoocKetucioTOOI-WindowFV faVsco. rapstomViewNeweNNCCoocKetucioTOOI-WindowFV faVsco.|s ~$ JY-20915-fix-missing-header-text-relaproidetKeroaioh.© SyncMaibox.phpEinfection ison disTextRelayServiceTest.phpMENSTAmMANISRNAWERHOsanemajiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM+README.mdô sonar-proiect propertiesE testpySUn tieo aciam-xmiis vetur.confialisM. WEBHOOK FILTERNG-MPLEMENTAT> h Extemal Librariesv E Scratches and ConsolesServicht+.@cv E DatabaseV AEconsolevlttinnwoloetosASF 1s749APRODconsoleASTAGINGconsoleDockerPyyminny.on3.env.productionclass Field extends Modelpublic 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_PICKLISTockustoubiac const stoind TYpE NunsERoublaic const stoind TYPE CURRENYoublic const stoing TYPE BOOLEANoub1e const stoino TYPE TEXTAREAQutoti liminoy.crm lavout entitiesMRW 9rowsd =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:c norerhsewroetht938 75SbSf1d-dfbf-4783-a4Se-8cf7359312c1790 c205S646-fSS2-46b1-8689-9200f156cc3g1789 3357965f-6b86-4a8a-a8ec-5363ebe861b2Tho Huncnoll nhhin hac Hoon H.MockeriitEWEAV=custom.loglaravel.logSF (iminny@localhost) xHS.Jocal jiminny@blocalhost)# console pron# consolefFulA console (STAGINGTeAuto v"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 layoutamIZ parent entity id ?oeonsedsohTOOУLYThu 28 May 9:26:19TextRelayServiceTesteeendhrner 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 TEXTUSERECAOGLE TEXT 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 aminingt<CodeAdhotive1s_vis1ble 1meadoniv282282282282282282282cnull<null>932932932932932coulls act vtyesunnary<null> follow-up1879 <nulle1880 cnulle1882 <null:u:: nult1885 <null1943 Location1984 OutconeldesemeietoniActivity SunnaryNext Steps….cnulaconllsCall Outcon.@ default_value Vwus mandarorycoulls<null><null>cnull<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:091782010115-14:5348542029.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 1GIM:1906 76M Maur Tosme 27Aen liTe9 ensno....
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79362
|
2784
|
43
|
2026-05-28T06:26:19.821521+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949579821_m1.jpg...
|
PhpStorm
|
faVsco.js – crm_fields [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"X4T2-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 ~ $ I|T4STAGE (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.87stion:~$ |T5QA (-zsh)~ $ 0STAGEX 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
-1455075367370276456
|
NULL
|
typing_pause
|
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"X4T2-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 ~ $ I|T4STAGE (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.87stion:~$ |T5QA (-zsh)~ $ 0STAGEX 16FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
79360
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
79340
|
2785
|
21
|
2026-05-28T06:25:39.651162+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949539651_m2.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Alfred Search Field
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Alfred Search Field","depth":1,"on_screen":true,"help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
7926243118367575
|
7570943109877468232
|
typing_pause
|
hybrid
|
NULL
|
Alfred Search Field
PhpStormViewNeWENNCFV faVsco.i Alfred Search Field
PhpStormViewNeWENNCFV faVsco.is ~$2 JY-20915-fix-Einfection ison disMENSTAmMAINTERNAL_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> h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowsoes roeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhostASF fiminny@localhost)& zoho_dev jiminny@localhost)Servicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocTOOI-Windowa Kemnelonip© SyncMailbox.phpTextRelayServiceTest.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 supportedSussoerqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTnuhite conet sranewpr wieeshnhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10shone101102public 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':Meouttrtatllim nny com thwottteW 1row vG00Tx Auto1QG0A0Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAO5.LAGK OOOG NIAGORIONAG)AD cra configuration idtypdcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85nluadotaadt2002.40.16 1HISZIO6TOOУLYThu 28 May 9:25:39+0.TMockariitlaravel.logS-tim anuchioesthoenXconedia PereA console (EU)A console (STAGING]AAXAAY D800€Do jminnyE250252257)I 1 I1=270-274=775021 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipednive':TRenASTsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJIOTM tosne t 1.ncos1:on t 3d = metean kalWHERE 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)exoires = 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 valuesselect * from eon fields where tvoe = "nultcoickuisteSPLECT * FRON con layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-44cSa849d65c') = uujd:SELECT * FROM crn_fields WHERE id = 3014SELECT * EROM cnn £4eld valuee WHEDE con £4e1a 30 = 7912.aer 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.json (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 tcdaotvCSVV4+.0...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79339
|
2784
|
30
|
2026-05-28T06:25:38.557548+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949538557_m1.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
c
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"c","depth":1,"bounds":{"left":0.26180556,"top":0.16777778,"width":0.43194443,"height":0.05888889},"on_screen":true,"value":"c","help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
3102445089172487244
|
3102445089172487244
|
typing_pause
|
hybrid
|
NULL
|
c
iTerm2ShellEditViewSessionScriptsProfilesWindowH c
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)T1DOCKER (docker-compose)public/index.php4025.64814336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 RunninONEdocker_lamp_1• '/usr/local/bin/php''at2>&1docker_lamp_12026-05-28 06:25:09 RunnirONEdocker_lamp_1• '/usr/local/bin/php''ar/1'2>&1docker_lamp_12026-05-2806:25:16Runnir27.0.0.128/May/2026:06:25:10+0000"GET[PHONE]6 wwwdocker_1amp_1docker_lamp_1/1/fd/1'2S DONE• '/usr/local/bin/php' 'ar2>81docker_1amp_12026-05-28 06:25:18 RunnirONEdocker_lamp_1 | , '/usr/local/bin/php' 'ar2>&1docker_lamp_12026-05-28 06:25:19 Runnirs=15]3S DONEdocker_lamp_11 '/usr/local/bin/php' 'ar'/proc/1/fd/1' 2>&1docker_lamp_1 |2026-05-28 06:25:23 RunnirONEdocker_lamp_11 l '/usr/local/bin/php' 'ar₴2-zsh883configcfctvcfdсрclclecontactsdocker_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] -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1 |7S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan' conference:pre-meeting-notification › '/proc/1/fd/1' 2>&1View in Docker Desktop@ View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"0 84-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)See [URL_WITH_CREDENTIALS] ~ $ ln 212.5.153.87send disconnect: Broken pipe~ $DSTAGEQIFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79338
|
2785
|
20
|
2026-05-28T06:25:38.457035+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949538457_m2.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
c
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"c","depth":1,"on_screen":true,"value":"c","help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
3102445089172487244
|
3102445089172487244
|
typing_pause
|
hybrid
|
NULL
|
c
PhpStormViewNeWENNCFV faVsco.is ~$2 JY-20915-fix c
PhpStormViewNeWENNCFV faVsco.is ~$2 JY-20915-fix-Einfection ison disMENSTAmMAINTERNAL_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> h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowsoes roeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhostASF fiminny@localhost)& zoho_dev jiminny@localhost)Servicesv M DatabaseV AEUconsoleviminnweloca nostASF S16 m4HSllocalApponA consoleASTAGINGconsolaTnlockerCoocTOOI-Windowa Kemnelonip© SyncMailbox.phpTextRelayServiceTest.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 supportedSussoerqub dic const string TYPE PERLENpercentqubsic const stoind NpE PriKesTnuhite conet sranewpr wieeshnhite conet etainewos Rimisnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10shone101102public 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':Meouttrtatllim nny com thwottteW 1row vG00Tx Auto1QG0A0Did(Duuid (UUID with time-low and tine-high swapped)2A707921 EAO5.LAGK OOOG NIAGORIONAG)AD cra configuration idtypdcontenenceesunmrIM nandEvent Based Lawoutncreatedl at2822-12.15 14-53-85nluadotaadt2002.40.16 1HISZIO6TOOУLYThu 28 May 9:25:38+0.TMockariitlaravel.logS-tim anuchioesthoenXconedia PereA console (EU)A console (STAGING]AAXAAY D800€Do jminnyE250252257)I 1 I1=270-274=775021 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipednive':TRenASTsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJIOTM tosne t 1.ncos1:on t 3d = metean kalWHERE 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)exoires = 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 valuesselect * from eon fields where tvoe = "nultcoickuisteSPLECT * FRON con layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-44cSa849d65c') = uujd:SELECT * FROM crn_fields WHERE id = 3014SELECT * EROM cnn £4eld valuee WHEDE con £4e1a 30 = 7912.aer 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.json (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 tcdaotvCSVV4+.0...
|
79335
|
NULL
|
NULL
|
NULL
|
|
79337
|
2784
|
29
|
2026-05-28T06:25:37.686563+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949537686_m1.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Alfred Search Field
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Alfred Search Field","depth":1,"bounds":{"left":0.26180556,"top":0.16777778,"width":0.43194443,"height":0.05888889},"on_screen":true,"help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
7926243118367575
|
7570943109877468232
|
visual_change
|
hybrid
|
NULL
|
Alfred Search Field
iTerm2ShellEditViewSessionScri Alfred Search Field
iTerm2ShellEditViewSessionScriptsProfilesWindowHelp100% C47 8• Thu 28 May 9:25:37DOCKER (docker-compose)screenpipe"181DOCKER₴81DEV (docker)₴2-zshH311DOCKER (docker-compose)docker_lamp_1| [IP_ADDRESS] -28/May/2026:06:24:54 +0000 "GET /index.php" 500/home/jiminny/public/index.php2287.17814336 wwwdocker_lamp_1127.0.0.128/May/2026:06:public/index.php4025.64814336 wwwdocker_lamp_1docker_lamp_12026-05-28 06:25:06 RunnirONEdocker_lamp_1, '/usr/local/bin/php''arBuild mysql queryChoose the table2>&1docker_lamp_12026-05-28 06:25:09 Running L'artisan™alalers:monttor-activitiesJ . 7s DONEdocker_lamp_1/1', '/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[PHONE]6 wwwdocker_1amp_12S 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, '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh > */proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:25:19 Running ['artisan'mailbox:batch:process --max-batcheS=15J3S DONEdocker_lamp_1" '/usr/local/bin/php' 'artisan'mailbox:batch:process --max-batches=15 >'/proc/1/fd/1'2>&1docker_lamp_112026-05-28 06:25:23 Running ['artisan' activity:purge-stale] ....... 2s DONEdocker_lamp_1 | , '/usr/local/bin/php' 'artisan' activity:purge-stale › '/proc/1/fd/1' 2>&1docker_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.31614336 wwwdocker_lamp_1docker_lamp_1docker_1amp_11 Relayed 0 message(s)..... 55 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-notificatio127.0.0.1 -28/May/2026:06:25:30 +0000 "GET /index.php" 500 /home/jiminny/public/index.p3[PHONE]6 www84-zsh85...ip-10-30-129-190:~ (nc)XIT2PROD (ssh)S[URL_WITH_CREDENTIALS] ~ $ [|T4STAGE (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:~$ |T5QA (-zsh)X 16FE (-zsh)lukas®Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lPRODSTAGEFRONTENDX Y7 EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSIONView in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach...
|
79336
|
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
|
|
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
|
|
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
|
|
79332
|
2784
|
26
|
2026-05-28T06:25:29.968080+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949529968_m1.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Alfred Search Field
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Alfred Search Field","depth":1,"bounds":{"left":0.26180556,"top":0.16777778,"width":0.43194443,"height":0.05888889},"on_screen":true,"help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
7926243118367575
|
7570943109877468232
|
typing_pause
|
hybrid
|
NULL
|
Alfred Search Field
iTerm2ShellEditViewSessionScri Alfred Search Field
iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh883T1DOCKER (docker-compose)fd/1'2>&1docker_lamp_1docker_lamp_1run_artisan_schedule: Done waitingfor schedule:rundocker_1amp_1| [IP_ADDRESS]/May/2026:06:24:37+0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS] -28/May/2026:06:24:45 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/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_11 '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot > */proc/1/fd/12>&1docker_1amp_12026-05-28 06:25:09 Running ['artisan' dialers:monitor-activities] . 7s Ddocker_lamp_1 | '/usr/local/bin/php' 'artisan' dialers:monitor-activities › */proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:16 RunningC'artisan'jiminny:monitor-social-accounts][IP_ADDRESS] -28/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_1amp_12S DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan' jiminny:monitor-social-accounts > '/proc/1/fd/1' 2>&1docker_lamp_1ONE2026-05-28 06:25:18 Running ['artisan'mailbox:skip-lists:refresh] . 1s Ddocker_lamp_1• '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh › */proc/1/fd/1'2>&1docker_lamp_12026-05-28 06:25:19 Running ['artisan' mailbox:batch:process --max-batcheS=15]3S DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'mailbox:batch:process--max-batches=15 >'/proc/1/fd/1' 2>&1docker_lamp_12026-05-28 06:25:23 Running ['artisan' activity:purge-stale]....... <S UONEdocker_1amp_1, '/usr/local/bin/php' 'artisan' activity:purge-stale › '/proc/1/fd/1' 2>&1docker_lamp_114336 www2026-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.316View in Docker Desktopo View ConfigL View Logsw Enable Watchd DetachDOCKER (docker-compose)screenpipe"84T2-zsh85...ip-10-30-129-190:~ (nc)PROD (ssh)S[URL_WITH_CREDENTIALS] t3EU (-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:~$ |T5QA (-zsh)t6FE (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ lFRONTENDEXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ [EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79331
|
2785
|
17
|
2026-05-28T06:25:29.865302+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949529865_m2.jpg...
|
Alfred
|
Alfred
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
Alfred Search Field
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Alfred Search Field","depth":1,"on_screen":true,"help_text":"Alfred Search","role_description":"text field","is_enabled":true,"is_focused":true}]...
|
7926243118367575
|
7570943109877468232
|
typing_pause
|
hybrid
|
NULL
|
Alfred Search Field
PhpStormViewCoocTOOI-WindowFV Alfred Search Field
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 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':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 DOO0€Do jminnyE 250E269=268021 A1 A18 V2 V6 Aselect * fron crn_configurations where provider = 'pipednive':TRenASTsa.*t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJIOTM tasee t1.ncos1: on t 3d = meteankalWHERE u.team_id = 19 and sa.provider = 'pipednive':CGLEAT & SOOM cocial Accounte WHGOE 44 = 11140UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)expires = 1779891997WHERE id = 1116:"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc"select * Fron ern Field valuesselect * from eon fields where tvoe = "nultcoickuistecon lavouts WHERE uufd to binC+7c327871-f625-4056-9a84-46cSa849d65c') = uujd:SELECT * EROM con Sselde WHFRE 30 = 3012.SELECT * EROM cnn £4eld valuee WHEDE con £4e1a 30 = 7912.TO0%L7Thu 28 May 9:25:2gTextRelayServiceTesteeendhrner 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 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 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 isForCurrentEnvironnantorectly via tinker to veriry the header loaic without disoatchina amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(Som: Service=ssvc-soctServicelcontiaminny.google textuser'Ask anuthino (2a1§ [EMAIL]-onhf-MnGo/onleEvent Based Layout2822-12-15 14:53:852822-12-15 14:53:85CSVyДus.00Mindair Tosma 27d liTeeensd...
|
NULL
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
79325
|
2785
|
14
|
2026-05-28T06:25:22.201680+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949522201_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...
|
[{"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}]...
|
6445247769588009110
|
-6618793407836651056
|
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
PhpStormViewCoocRurToolWindowFV faVsco.s ~$ JY-20915-fix-missing-header-text-relaKeroaioh.© SyncMailbox.phpEinfection ison distTextRelayServiceTest.phpphp fiminny.phgclass Field extends ModelMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas mause RequiresUUIduse EnunsM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xmlT% raw.sal.query.soM4 README.mdlô sonar-proiect propertiesEtest.ov<> Untitied Diagram.xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> h Extemal Librariesv Eg Scratches and Consolesv M Database Consoleswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedqub dic const string TYPE PERLENpercentqub sic const string tpE PriKeisTconsole iauDEALRSKS TEUDTEUEUTEUvm anuchdes nochconsola timinowtoes oeAN fiiminovAlocalbostt999909nuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivosh2 HS.Jlocal jiminny@localhosttiminoutioeaindenpublic const string TYPE DATEpublic const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported'=& zoho_dev fiminny@localhostV A PRODpublic const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT"account"#concalo ropontServicos+o₫7) Outputtil jiminny.crm.Jayoutsv MDatabas,of04TeAudswconsoleRid Yie. cre configuration idyliminny@loch nostA HSLlocalcancaloN CTAGING# consoleTnastorTmockarconedia PereA console (EU)A console (STAGING)Aa24A LD8000select * fron crn_configurations where provider = 'pipedoive':SELEC)Eassa.*,t.ouner_id FROM social_accounts saJOIN users u on u.id = sa.sociable_idJIOTM tasee +1.ncos1:on t 3d = mtean 6aWHERE U.tean_id = 19 and sa.provider = 'pipedoive":SELECT * FROM social accounts WHERE id = 1116:Do jminny021 A1 A18 V2 V6 AUPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)E 262=268Em"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*select * from eon fields where tvoe e "nultcosckist'SELECT * FROM chn layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-4LcSa849d65c') = uujdRSELECT * FROM Crn_field_Values WHERE cra_field_id = 3014;TQMAA®type Ymoane "00%LXThu 28 May 9:25:21TextRelayServiceTesteeendhrner 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 isForCurrentEnvironnant orectly via tinker to verity the header logic without disaatchine amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(sow:Service=ssvc-soctServicelcontiatainny.ooogle textuser'Ask anuthino (2a1§ AdaptiveCSVyzE..00NV M Aaur Tosme272d6 lTeeensd...
|
79323
|
NULL
|
NULL
|
NULL
|
|
79324
|
2784
|
22
|
2026-05-28T06:25:21.779729+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949521779_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...
|
[{"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_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}]...
|
-6353775816605307290
|
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_fields WHERE id = 3014;
SELECT * FROM crm_field_values WHERE crm_field_id = 3014;
Project
Project...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79322
|
2784
|
21
|
2026-05-28T06:25:21.237676+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949521237_m1.jpg...
|
PhpStorm
|
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
Search
SELECT * FROM crm_layouts WHERE uuid_to_bin Search
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
[{"role":"AXTextField","text [{"role":"AXTextField","text":"Search","depth":1,"on_screen":false,"role_description":"text field","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327...","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.24791667,"height":0.024444444},"on_screen":false,"role_description":"text"},{"role":"AXStaticText","text":"SELECT a.id, a.uuid, a.actual_start_time, o.id, o....","depth":5,"bounds":{"left":0.0,"top":0.0,"width":0.24791667,"height":0.024444444},"on_screen":false,"role_description":"text"},{"role":"AXLink","text":"Customize","depth":1,"on_screen":true,"role_description":"link","is_enabled":true,"is_focused":false,"is_selected":false,"is_expanded":false},{"role":"AXStaticText","text":"Statements","depth":1,"on_screen":true,"role_description":"text"}]...
|
178535643791650527
|
804908737415890513
|
visual_change
|
accessibility
|
NULL
|
Search
SELECT * FROM crm_layouts WHERE uuid_to_bin Search
SELECT * FROM crm_layouts WHERE uuid_to_bin('7c327...
SELECT a.id, a.uuid, a.actual_start_time, o.id, o....
Customize
Statements...
|
79321
|
NULL
|
NULL
|
NULL
|
|
79321
|
2784
|
20
|
2026-05-28T06:25:20.062160+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949520062_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp100% C47 • Thu 28 May 9:25:19• 0DOCKER₴81DEV (docker)₴2-zsh88311DOCKER (docker-compose)docker_lamp_1• '/usr/local/bin/php' 'artisan'conference:monitor:count > */proc/1/fd/12>&1docker_lamp_12026-05-28 06:24:30 Running ['artisan'activity:aircall:check-and-renew][IP_ADDRESS]/May/2026:06:24:28 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6docker_lamp_1docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:aircall:check-and-renew> '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:24:33 Running ['artisan'track:retry-failed-downloads]2sDONEdocker_lamp_1fd/1'l '/usr/local/bin/php' 'artisan' track:retry-failed-downloads › */proc/1/2>&1docker_lamp_1docker_1amp_1run_artisan_schedule: Done waiting for schedule:rundocker_lamp_1127.0.0.1 -28/May/2026:06:24:37+0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:24:45+0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_lamp_128/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS] -28/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_lamp_1docker_1amp_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_11 '/usr/local/bin/php' 'artisan' dialers:monitor-activities › */proc/1/fd/1' 2>81docker_lamp_12026-05-28 06:25:16 Running ['artisan'jiminny:monitor-social-accounts] [IP_ADDRESS] -28/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_lamp_12S DONEdocker_1amp_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_11 l '/usr/local/bin/php' 'artisan' mailbox:skip-lists:refresh › */proc/1/fd/1' 2>81DOCKER (docker-compose)screenpipe"O ₴4-zsh85...ip-10-30-129-190:~ (nc)XIT2PROD (ssh)Seehttps://ubuntu.com/esm or run: sudo pro status181V View in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach886...-10-30-140-255:~ (-zsh)$7PROD*** System restart required ***Last login: Tue May 26 12:25:05 2026 from 212.5.153.87lukas@jiminny-prod-bastion:~$X 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 ~ $ lFRONTENDX 17EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
6262043027273996312
|
NULL
|
click
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelp100% C47 • Thu 28 May 9:25:19• 0DOCKER₴81DEV (docker)₴2-zsh88311DOCKER (docker-compose)docker_lamp_1• '/usr/local/bin/php' 'artisan'conference:monitor:count > */proc/1/fd/12>&1docker_lamp_12026-05-28 06:24:30 Running ['artisan'activity:aircall:check-and-renew][IP_ADDRESS]/May/2026:06:24:28 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6docker_lamp_1docker_lamp_1• '/usr/local/bin/php' 'artisan'activity:aircall:check-and-renew> '/proc/1/fd/1'2>&1docker_1amp_12026-05-28 06:24:33 Running ['artisan'track:retry-failed-downloads]2sDONEdocker_lamp_1fd/1'l '/usr/local/bin/php' 'artisan' track:retry-failed-downloads › */proc/1/2>&1docker_lamp_1docker_1amp_1run_artisan_schedule: Done waiting for schedule:rundocker_lamp_1127.0.0.1 -28/May/2026:06:24:37+0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:24:45+0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_lamp_128/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS] -28/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_lamp_1docker_1amp_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_11 '/usr/local/bin/php' 'artisan' dialers:monitor-activities › */proc/1/fd/1' 2>81docker_lamp_12026-05-28 06:25:16 Running ['artisan'jiminny:monitor-social-accounts] [IP_ADDRESS] -28/May/2026:06:25:10 +0000 "GET /index.php" 500 /home/jiminny/public/index.php6[PHONE]6 wwwdocker_lamp_12S DONEdocker_1amp_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_11 l '/usr/local/bin/php' 'artisan' mailbox:skip-lists:refresh › */proc/1/fd/1' 2>81DOCKER (docker-compose)screenpipe"O ₴4-zsh85...ip-10-30-129-190:~ (nc)XIT2PROD (ssh)Seehttps://ubuntu.com/esm or run: sudo pro status181V View in Docker Desktop@ View ConfigL View Logsw Enable Watchd Detach886...-10-30-140-255:~ (-zsh)$7PROD*** System restart required ***Last login: Tue May 26 12:25:05 2026 from 212.5.153.87lukas@jiminny-prod-bastion:~$X 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 ~ $ lFRONTENDX 17EXT (-zsh)ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0EXTENSION...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79323
|
2785
|
13
|
2026-05-28T06:25:19.920658+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949519920_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormViewCoocRurToolWindowFV faVsco.|s ~$ JY-20 PhpStormViewCoocRurToolWindowFV faVsco.|s ~$ JY-20915-fix-mis:Kemelonp© SyncMailbox.phpEinfection ison distTextRelayServiceTest.phpMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml1% raw.salquery.salM:README.mdô sonar-proiect propertiesEtest.ovwo on teo Mractom-xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhosttiminoutioeainden& zoho_dev jiminny@localhost)yewel#concalo ropontServicos+o₫v MDatabas,consoleyliminny@loch nostS:1s314mA HSLlocalcancaloN CTAGING# consoleTnastorPyyminny.onclass Field extends Modeluse RequiresUUIdUse cnunswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedoub1ie const string TYPE PERCENTIpercentqubsic const string ipE PriKESTnuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10public const string TYPE DATEpublic const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported'=public const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT7) Outputtit jiminny.crm field. valuesGi:wSrowsQMEA0wridy(m uuid UUID with tine-low and time-h_y: wcrn field id yO00 [CREDIT_CARD] HAHA CRAGARROGAR44801 6796ad28-7b4b-468a-9369-34aced141927hine accea.oscnec/chhoattanhariih44883 18db6888-48a2-4719-b76e-899d7f8abb24ALARZ ZZORAdA-ARI1-/RAS-079/-CCA7ZAАCANАMockeriit=custom.logaraveliosSF (iminny@localhost) xconedia Pere# console FulA console (STAGINGTwWLAV-24т248252253256257258=260E261=268TeAuto vDo jminny021 A1 A18 V2 Y6 Aselect * fron crn_configurations where provider = Oipedrave':CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idSd.xt.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 = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)WHERE id = 1116:"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc**"exotres":7989199select * Fron ern Field valuesselect * from con fields where tvoe = "nultcoickuisteSLECT * FRON con layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-44cSa849d65c') = uujd:SELECT * EROM con Sseldi values WHEDE con £lela 30 = 7912.Im value "3014 ny value ond3014my value two3014 ny valueThnes3014 ay value four3014 my value#iuem) Label Mam) sequence yay valuc onny value twony value threeny value fouray value fiveim is default yim) created. at8 2826-02-10 11:01:108 2926-92-10 11:01:188. 2826-82-10 11-81-188 2826-02-10 11:01:108 2026-02-10 11:01:16im updated. aty2026-02-10 11:01:162026-82-10 11:81:16WinhendeThttehhe2026-02-10 11:01:102026-82-10 11:01:16TO0%L7Thu 28 May 9:25:19TextRelayServiceTesteeendhrner hensemwiet+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 nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.comaeu 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 isForCurrentEnvironnant orectly via tinker to verity the header logic without disaatchine amvthinotioh.reading logic on a known message 1oSsvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(sow:Service=ssvc-soctServicelcontiatainny.ooogle textuser'Ask anuthino (2a1CAdastivCSVyДus.0027/010 liTeg ensd...
|
NULL
|
7209865614927502235
|
NULL
|
click
|
ocr
|
NULL
|
PhpStormViewCoocRurToolWindowFV faVsco.|s ~$ JY-20 PhpStormViewCoocRurToolWindowFV faVsco.|s ~$ JY-20915-fix-mis:Kemelonp© SyncMailbox.phpEinfection ison distTextRelayServiceTest.phpMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml1% raw.salquery.salM:README.mdô sonar-proiect propertiesEtest.ovwo on teo Mractom-xmlis vetur.confialisM.WEBHOOK_FILTERING.IMPLEMENTAT> 1h Extemal Librariesv E Scratches and Consolesv M Database Consolesconsole iauDEALRSKS TEUDTEUEUTEUvm anuctden noehconsola timinowsoes roeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhosttiminoutioeainden& zoho_dev jiminny@localhost)yewel#concalo ropontServicos+o₫v MDatabas,consoleyliminny@loch nostS:1s314mA HSLlocalcancaloN CTAGING# consoleTnastorPyyminny.onclass Field extends Modeluse RequiresUUIdUse cnunswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIAPICKLIST = "nuLti-picklist"ENot vet supportedoub1ie const string TYPE PERCENTIpercentqubsic const string ipE PriKESTnuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10public const string TYPE DATEpublic const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported'=public const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT7) Outputtit jiminny.crm field. valuesGi:wSrowsQMEA0wridy(m uuid UUID with tine-low and time-h_y: wcrn field id yO00 [CREDIT_CARD] HAHA CRAGARROGAR44801 6796ad28-7b4b-468a-9369-34aced141927hine accea.oscnec/chhoattanhariih44883 18db6888-48a2-4719-b76e-899d7f8abb24ALARZ ZZORAdA-ARI1-/RAS-079/-CCA7ZAАCANАMockeriit=custom.logaraveliosSF (iminny@localhost) xconedia Pere# console FulA console (STAGINGTwWLAV-24т248252253256257258=260E261=268TeAuto vDo jminny021 A1 A18 V2 Y6 Aselect * fron crn_configurations where provider = Oipedrave':CONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idSd.xt.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 = 'pipednive':SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhD0Va1nviCHEvnp)WHERE id = 1116:"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc**"exotres":7989199select * Fron ern Field valuesselect * from con fields where tvoe = "nultcoickuisteSLECT * FRON con layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-44cSa849d65c') = uujd:SELECT * EROM con Sseldi values WHEDE con £lela 30 = 7912.Im value "3014 ny value ond3014my value two3014 ny valueThnes3014 ay value four3014 my value#iuem) Label Mam) sequence yay valuc onny value twony value threeny value fouray value fiveim is default yim) created. at8 2826-02-10 11:01:108 2926-92-10 11:01:188. 2826-82-10 11-81-188 2826-02-10 11:01:108 2026-02-10 11:01:16im updated. aty2026-02-10 11:01:162026-82-10 11:81:16WinhendeThttehhe2026-02-10 11:01:102026-82-10 11:01:16TO0%L7Thu 28 May 9:25:19TextRelayServiceTesteeendhrner hensemwiet+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 nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.comaeu 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 isForCurrentEnvironnant orectly via tinker to verity the header logic without disaatchine amvthinotioh.reading logic on a known message 1oSsvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(sow:Service=ssvc-soctServicelcontiatainny.ooogle textuser'Ask anuthino (2a1CAdastivCSVyДus.0027/010 liTeg ensd...
|
NULL
|
NULL
|
NULL
|
NULL
|
|
79320
|
2785
|
12
|
2026-05-28T06:25:14.640979+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949514640_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...
|
[{"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}]...
|
-7334512262672537281
|
-8780802033898552894
|
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
PhpStormViewCoocRurToolWindowFV faVsco.|s ~$ JY-20915-fix-mis:Kemelonp© SyncMailbox.phpEinfection ison disTextRelayServiceTest.phpMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maM Makefile# package-lock.jsonE phpstan.neon.distEphpstan-baseline.neon<>phounit.xml18 raw.sal.query.solM: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 fiiminovAlocalbostt2 HS.Jlocal jiminny@localhosttiminoutioeainden& zoho_dev fiminny@localhostyewel#concalo ropontServicos+o₫v MDatabas,consoleyliminny@loch nostS:1s314mA HSLlocalcancaloN CTAGING# consoleTnastorPyyminny.onclass Field extends Modeluse RequiresUUIdUse cnunswoe constnwanichohsooublic const int LABEL MAXLENGTH = 255:oublic const sint DESCRIPTION MAXLENGTH = 191;public const string TYPE_HULIIPICKLIST = "nuLti-pickList"ENot vet supportedoub1ie const string TYPE PERCENTIpercentqubsic const string ipE PriKESTnuhite conet sranewpr wieeshnuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivoshpublic const string TYPE_PHONEnhile conet etaiinauivor10public const string TYPE DATEpublic const string TYPE TIMEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported':public const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT7) Outputtit jiminny.crm field. valuesGi:wSrows5 0wridy(m uuid UUID with tine-low and time-h_BQEAAG7: ern field id yO00 [CREDIT_CARD] HAHA CRAGARROGAR44801 6796ad28-7b4b-468a-9369-34aced141927hine accea.oscnec/chhoattanhariih44883 18db6888-48a2-4719-b76e-899d7f8abb24ALARZ ZZORAdA-ARI1-/RAS-079/-CCA7ZAАCANАMockeriitcustom.loglaravel.logSF (iminny@localhost) xconedia PereA console (EU)console (STAGINGA42Do jminnyE 250252257258E 262=268021 A1 A18 V2 Y6 Aselect * fron crn_configurations where provider = Oipedrave':CONCAT(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_idJINTM tasee+uncosi:ontid = mteanfoWHERE 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 = 1779891997WHERE id = 1116:"orovider_user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBи:"orovider refreshtoken". "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc**select * Fron ern Field valuesselect * from eon fields where tvoe = "nultcoickuisteSELECT * FRON con layouts WHERE uufd to bin(+7c327871-4625-4056-9a8f-44cSa849d65c') = uujd:≤®Ест + БRON сnn £ielde WHERE 30 - 39142SELECT * EROM eon Sseldi values WHEDE con flela 3a = 791d,Im value "3014 ny value ond3014 my value tao3014 ey valueThnes3014 ay valuefour3014 ew valuIlabelVny value oncsequence Yis defaut ?ny value twony valme Thnedny value fourew walms fivdIDcreated at w64044-00.40 44.012408 2926-92-19 11:01:198. 2826-82-10 11-81-188 2026-02-10 11:01:10A2024-02.1A 11-01-10I updated at2026-02-10 11:01:162026-82-10 11:81:162926-92-18 11-910162026-02-10 11:01:102024-02.19 11-91-19TO0%L7Thu 28 May 9:25:14TextRelayServiceTesteeendhrner 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 nailbox address# e.g. txt.jiminny.com or txt.staging.jiminny.comaeu 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 isForCurrentEnvironnant orectly via tinker to verity the header logic without disaatchine amvthinotioh.Ssvc = new class extends \Jiminny\Services\Mail\TextRelayService & public function _construct(sow:Service=ssvc-soctServicelcontiatainny.ooogle textuser'Ask anuthind (2A1§ AdaptiveCSVyđu5.00NO MMald Tosme 27567 lTS8ensd...
|
79318
|
NULL
|
NULL
|
NULL
|
|
79319
|
2784
|
19
|
2026-05-28T06:25:12.367103+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949512367_m1.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_1
|
NULL
|
NULL
|
NULL
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh88311DOCKER (docker-compose)docker_lamp_1l '/usr/local/bin/php' "artisan'jiminny:monitor-social-accounts > */proc/1/fd/1'2>&1docker_lamp_10.128/May/2026:06:24:182026-05-28 06:24:16 Running ['artisan'mailbox:skip-lists:refresh] 127.0.+0000 "GET /index.php"500 /home/jiminny/public/index.php4906.31514336 wwwdocker_lamp_11 . 7s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh ›'/proc/1/fd/1'2>81docker_1amp_12026-05-28 06:24:24 Running ['artisan'mailbox:batch:process--max-batcheS=15]2S DONEdocker_lamp_1'/proc/1/fd/1'l '/usr/local/bin/php' 'artisan' mailbox:batch:process --max-batches=15 >2>&1docker_lamp_12026-05-28 06:24:26 Running ['artisan'conference:monitor:count]... 4s DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:monitor:count > */proc/1/fd/12>&1docker_lamp_12026-05-28 06:24:30 Running ['artisan'activity:aircall:check-and-renew][IP_ADDRESS]/May/2026:06:24:28 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1docker_lamp_1c/1/fd/1'l '/usr/local/bin/php' 'artisan' activity:aircall:check-and-renew > '/pro2>&1docker_lamp_12026-05-28 06:24:33 Running ['artisan' track:retry-failed-downloads]25DONEdocker_lamp_1fd/1'1 '/usr/local/bin/php' 'artisan' track:retry-failed-downloads › '/proc/1/2>&1docker_lamp_1docker_lamp_1run_artisan_schedule: Done waiting for schedule:rundocker_lamp_1| [IP_ADDRESS] -public/index.php 2[PHONE]6 www2[PHONE]28 May/2026:06:24:37 +8000 schedule:ru28/May/2026:06:24:37 +0000 "GET /index.php" 500 /home/jiminny/docker_lamp_1| [IP_ADDRESS]/May/2026:06:24:45 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_1amp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan' meeting-bot:schedule-bot] ... 2s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot> */proc/1/fd/12>&1DOCKER (docker-compose)screenpipe"С *4-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] 13EU (-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.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 ~ $ lX 17EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0100% C47 8• Thu 28 May 9:25:12181886...-10-30-140-255:~ (-zsh)$7PRODSTAGEFRONTENDEXTENSION...
|
NULL
|
2534913172624639708
|
NULL
|
typing_pause
|
ocr
|
NULL
|
iTerm2ShellEditViewSessionScriptsProfilesWindowHel iTerm2ShellEditViewSessionScriptsProfilesWindowHelpDOCKER₴81DEV (docker)₴2-zsh88311DOCKER (docker-compose)docker_lamp_1l '/usr/local/bin/php' "artisan'jiminny:monitor-social-accounts > */proc/1/fd/1'2>&1docker_lamp_10.128/May/2026:06:24:182026-05-28 06:24:16 Running ['artisan'mailbox:skip-lists:refresh] 127.0.+0000 "GET /index.php"500 /home/jiminny/public/index.php4906.31514336 wwwdocker_lamp_11 . 7s DONEdocker_lamp_1• '/usr/local/bin/php' 'artisan'mailbox:skip-lists:refresh ›'/proc/1/fd/1'2>81docker_1amp_12026-05-28 06:24:24 Running ['artisan'mailbox:batch:process--max-batcheS=15]2S DONEdocker_lamp_1'/proc/1/fd/1'l '/usr/local/bin/php' 'artisan' mailbox:batch:process --max-batches=15 >2>&1docker_lamp_12026-05-28 06:24:26 Running ['artisan'conference:monitor:count]... 4s DONEdocker_lamp_11 '/usr/local/bin/php' 'artisan'conference:monitor:count > */proc/1/fd/12>&1docker_lamp_12026-05-28 06:24:30 Running ['artisan'activity:aircall:check-and-renew][IP_ADDRESS]/May/2026:06:24:28 +0000 "GET /index.php" 500 /home/jiminny/public/index.php3[PHONE]6 wwwdocker_lamp_1docker_lamp_1c/1/fd/1'l '/usr/local/bin/php' 'artisan' activity:aircall:check-and-renew > '/pro2>&1docker_lamp_12026-05-28 06:24:33 Running ['artisan' track:retry-failed-downloads]25DONEdocker_lamp_1fd/1'1 '/usr/local/bin/php' 'artisan' track:retry-failed-downloads › '/proc/1/2>&1docker_lamp_1docker_lamp_1run_artisan_schedule: Done waiting for schedule:rundocker_lamp_1| [IP_ADDRESS] -public/index.php 2[PHONE]6 www2[PHONE]28 May/2026:06:24:37 +8000 schedule:ru28/May/2026:06:24:37 +0000 "GET /index.php" 500 /home/jiminny/docker_lamp_1| [IP_ADDRESS]/May/2026:06:24:45 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 3[PHONE]6 wwwdocker_lamp_1| [IP_ADDRESS]/May/2026:06:24:54 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 2[PHONE]6 wwwdocker_lamp_11 [IP_ADDRESS] -28/May/2026:06:25:01 +0000 "GET /index.php" 500 /home/jiminny/public/index.php 4025.648 14336 wwwdocker_1amp_1docker_lamp_12026-05-28 06:25:06 Running ['artisan' meeting-bot:schedule-bot] ... 2s DONEdocker_lamp_11 l '/usr/local/bin/php' 'artisan'meeting-bot:schedule-bot> */proc/1/fd/12>&1DOCKER (docker-compose)screenpipe"С *4-zsh85...ip-10-30-129-190:~ (nc)T2PROD (ssh)S[URL_WITH_CREDENTIALS] 13EU (-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.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 ~ $ lX 17EXT (-zsh)lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ 0100% C47 8• Thu 28 May 9:25:12181886...-10-30-140-255:~ (-zsh)$7PRODSTAGEFRONTENDEXTENSION...
|
79317
|
NULL
|
NULL
|
NULL
|
|
79318
|
2785
|
11
|
2026-05-28T06:25:11.809119+00:00
|
/Users/lukas/.screenpipe/data/data/2026-05-28/1779 /Users/lukas/.screenpipe/data/data/2026-05-28/1779949511809_m2.jpg...
|
PhpStorm
|
faVsco.js – SF [jiminny@localhost]
|
1
|
NULL
|
monitor_2
|
NULL
|
NULL
|
NULL
|
NULL
|
PhpStormViewFV faVsco.s$ JY-20915-fix-mlCoocTOOI-W PhpStormViewFV faVsco.s$ JY-20915-fix-mlCoocTOOI-WindowKemelonp© SyncMailbox.phpMockeriitaraveliosSF (iminny@localhost)xconedia Pere# consolefFulEinfection ison distMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maMMakerd0 package-lock.jsonEphpstan.neon.distE phpstan-baseline.ncon<>phpunit.xmlRraw_sal.query.soMAPCAOMS mafê sonar-proiect-propertiesEtest.ov<> Untitied Diagram.xmlis vetur.confialisMWCONDAN CIYRONG MMORNRNRIT> 1h Extemal Librariesv Eg Scratches and Consolesv E Database ConsolesTextRelayServiceTest.phpPyyminny.onconsole iauADEAL RISKS (EUFDTEUEUTEUvm anuchdes nochconsola timinowtoes oeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhostASE fliminnvAlocslboett& zoho_dev fiminny@localhost• Аpроn#concalo ropontServico,+o₫v MDatabas,V AEUA consoleyliminny@loch nostS:758 mdA HSLlocalvonelV CTAGNGrancaloTnastorclass Field extends Modeluse RequiresUUIduse EnunsA console (STAGINGWwweAVDA009-247248= 250select * fron crn_configurations where provider = Oipedrave':Do jminnyUaalalyzyoCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idpublic const int NAME MAX_LENGTH = 128oublic const int LABEL MAXLENGTH = 255:252oublic const sint DESCRIPTION MAXLENGTH = 191;U.chsst,sa.*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.team_id = 19 and sa.provider = 'pipednive':public const string TYPE_MULTIPICKLIST = 'nulti-picklist';I Not vet supportedoub1ie const string TYPE PERCENTIpercent256257258=260E261SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhDOVa1nviCHEvnp)qubsic const stoind NpE PriKesTexpires = 1779891997,nuhite conet sranewpr wieeshWHERE id = 1116:nuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivosh"orovider user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBw:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*=268nhile conet etaiinauivor10select * fron ern sield valuespublic const string TYPE DATEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported":select * from eon fields where tvoe = "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a8f-44C5a849d65c') = uuid;SELECT * FROM crn_field_values WHERE crn_field_id = 3014public const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT"account"7 Outputtii jiminny.crm.fields84 roursRid YдQQEA®(Muuid (UUID with time-low and time-high swapped) YAn com confiquration id y :Am cra provider id2527 87593011-6d28-4614-a631-69602a82c39925463ecShedh-5c68-4h4a-925c-7edf9heh0a1,2 hs tao.id,he usen iae. of all notification follouendg label vDeal. TagsUser Is of all notification followers2547 AX0R4d67-6161-4401-8692-1018762780292hs_user_ids_of_all_notification_unfollowersUser IDs of all notification unfollowers2548 2ff60785-64b7-4f63-b8ba-387614678634Z01? 1291600d.D4T4-1A-9hAL-RROGhEnAE,3014 a303d6Sa-0881-43d8-695e-1f£4bec8c4283314 c199159-coff-4685-ac9c-85d7A6f48a0s2 hs-user_ids_of_all owners39 picktestmultilc39 picktestaulae2 hs shaced tean stadUser IDs of all ounersDCKIeSEURepicktestaulalShared teansX74GA0d02062-1044-4990-9470-2026d671462,nhe chanad neanhdChanod neoneXle Mhlkaaco Con elsahahehdtathatooXozz eocgonge, ched.nnk.Oond, OunnnkanAhed2 hs ouning teans2 hs keywordsOwning TeansCompany KeywordsTO0УLYThu 28 May 9:25:11TextRelayServiceTestner 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 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 nam# eu or us3. Run the sync manually via tinker (inside docker_lanp_1 ):eosstnaegdocker exec -it docker_lamp_1 php artisan tinkerapp(\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 isForCurrentEnvironnentorectly via tinker to verity the header logic without disaatchine amvthinotioh.Ssvc = new class extends \Jiminny|Services\Mail\TextRelayService & public function _construct(sowServiceassvc-soetServicelconttatainny.google text user"Ask anuthind (2A1§ AdaptiveW description YList of tag ids applicable to a deal. This property is set autonatically by HubSpotCSVyДus.00: D type YnupeoickostThe user IDs of all users that have clicked follow within the obnect to opt-in to getting follow notificationsnulti-picklistThe user Ils of all object ouners that have clicked unfollow within the object to opt-out of getting follow noti.The user Ils of all ouners of this record.konlsmulti-picklistnulti-picklistnultil-picklistcnulnultsi-picktistAdo cional teans wose usens con access the benl based on thein permissions. Thiis can be ser mnuslly on thnoughnults-pickttetAdditional users that can access the Deal based on their permissions. This can be set manually or through WorkfeenhehhehThe teams that are attributed to this record.nulti-picklistA List of company vertical descriptors. Typically more granular than industry classificationnulti-picklist275:57...
|
NULL
|
-1831302985886233372
|
NULL
|
typing_pause
|
ocr
|
NULL
|
PhpStormViewFV faVsco.s$ JY-20915-fix-mlCoocTOOI-W PhpStormViewFV faVsco.s$ JY-20915-fix-mlCoocTOOI-WindowKemelonp© SyncMailbox.phpMockeriitaraveliosSF (iminny@localhost)xconedia Pere# consolefFulEinfection ison distMENSTAmMAINTERNAL_WEBHOOK SETUP.mdjiminny_storagewulicancas maMMakerd0 package-lock.jsonEphpstan.neon.distE phpstan-baseline.ncon<>phpunit.xmlRraw_sal.query.soMAPCAOMS mafê sonar-proiect-propertiesEtest.ov<> Untitied Diagram.xmlis vetur.confialisMWCONDAN CIYRONG MMORNRNRIT> 1h Extemal Librariesv Eg Scratches and Consolesv E Database ConsolesTextRelayServiceTest.phpPyyminny.onconsole iauADEAL RISKS (EUFDTEUEUTEUvm anuchdes nochconsola timinowtoes oeAN fiiminovAlocalbostt2 HS.Jlocal jiminny@localhostASE fliminnvAlocslboett& zoho_dev fiminny@localhost• Аpроn#concalo ropontServico,+o₫v MDatabas,V AEUA consoleyliminny@loch nostS:758 mdA HSLlocalvonelV CTAGNGrancaloTnastorclass Field extends Modeluse RequiresUUIduse EnunsA console (STAGINGWwweAVDA009-247248= 250select * fron crn_configurations where provider = Oipedrave':Do jminnyUaalalyzyoCONCAT(u.id, CASE WHEN u.id = t.owner_id THEN • (ouner)' ELSE •* END) AS user_idpublic const int NAME MAX_LENGTH = 128oublic const int LABEL MAXLENGTH = 255:252oublic const sint DESCRIPTION MAXLENGTH = 191;U.chsst,sa.*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.team_id = 19 and sa.provider = 'pipednive':public const string TYPE_MULTIPICKLIST = 'nulti-picklist';I Not vet supportedoub1ie const string TYPE PERCENTIpercent256257258=260E261SELECT * FROM social accounts WHERE id = 1116:UPDATE social. accounts SET provider user token = *viu:AOIBAHS-L2TNK2yuuuaLoffzhWb9crUNKTok4F109cinXqp_6AE0hDhDOVa1nviCHEvnp)qubsic const stoind NpE PriKesTexpires = 1779891997,nuhite conet sranewpr wieeshWHERE id = 1116:nuhile conet etasneiVprtisyenpublic const string TYPE_TEXTAREAnhile conet etainoivosh"orovider user_token". "vlu:AOTBAH1-L2TNK2yuuuaLoifzh#b9crUNKTok4F109rinXop_6AE0h0h00Va1nvWCHEynpvSEAAAAf1B8Bqkchk#69a9BBw:"orovider refreshtoken": "5034113:19555731-87c1425848c813d82767ee975f6044d46b6b2bfc*=268nhile conet etaiinauivor10select * fron ern sield valuespublic const string TYPE DATEpublic const string TYPE DATETIMEpublic const string TYPE UNSUPPORTED = *unsupported":select * from eon fields where tvoe = "nultcoickuisteSELECT * FROM crn_layouts WHERE uuid_to_bin('7c327871-fc25-4c56-9a8f-44C5a849d65c') = uuid;SELECT * FROM crn_field_values WHERE crn_field_id = 3014public const string OBJECT LEAGoublic const stoing OBJECT ACCOUNT"account"7 Outputtii jiminny.crm.fields84 roursRid YдQQEA®(Muuid (UUID with time-low and time-high swapped) YAn com confiquration id y :Am cra provider id2527 87593011-6d28-4614-a631-69602a82c39925463ecShedh-5c68-4h4a-925c-7edf9heh0a1,2 hs tao.id,he usen iae. of all notification follouendg label vDeal. TagsUser Is of all notification followers2547 AX0R4d67-6161-4401-8692-1018762780292hs_user_ids_of_all_notification_unfollowersUser IDs of all notification unfollowers2548 2ff60785-64b7-4f63-b8ba-387614678634Z01? 1291600d.D4T4-1A-9hAL-RROGhEnAE,3014 a303d6Sa-0881-43d8-695e-1f£4bec8c4283314 c199159-coff-4685-ac9c-85d7A6f48a0s2 hs-user_ids_of_all owners39 picktestmultilc39 picktestaulae2 hs shaced tean stadUser IDs of all ounersDCKIeSEURepicktestaulalShared teansX74GA0d02062-1044-4990-9470-2026d671462,nhe chanad neanhdChanod neoneXle Mhlkaaco Con elsahahehdtathatooXozz eocgonge, ched.nnk.Oond, OunnnkanAhed2 hs ouning teans2 hs keywordsOwning TeansCompany KeywordsTO0УLYThu 28 May 9:25:11TextRelayServiceTestner 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 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 nam# eu or us3. Run the sync manually via tinker (inside docker_lanp_1 ):eosstnaegdocker exec -it docker_lamp_1 php artisan tinkerapp(\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 isForCurrentEnvironnentorectly via tinker to verity the header logic without disaatchine amvthinotioh.Ssvc = new class extends \Jiminny|Services\Mail\TextRelayService & public function _construct(sowServiceassvc-soetServicelconttatainny.google text user"Ask anuthind (2A1§ AdaptiveW description YList of tag ids applicable to a deal. This property is set autonatically by HubSpotCSVyДus.00: D type YnupeoickostThe user IDs of all users that have clicked follow within the obnect to opt-in to getting follow notificationsnulti-picklistThe user Ils of all object ouners that have clicked unfollow within the object to opt-out of getting follow noti.The user Ils of all ouners of this record.konlsmulti-picklistnulti-picklistnultil-picklistcnulnultsi-picktistAdo cional teans wose usens con access the benl based on thein permissions. Thiis can be ser mnuslly on thnoughnults-pickttetAdditional users that can access the Deal based on their permissions. This can be set manually or through WorkfeenhehhehThe teams that are attributed to this record.nulti-picklistA List of company vertical descriptors. Typically more granular than industry classificationnulti-picklist275:57...
|
NULL
|
NULL
|
NULL
|
NULL
|