From cabe5545ae4ca9394262919cdadade58c6ef2fc3 Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Tue, 7 Jul 2026 15:32:18 +0530 Subject: [PATCH] Use SDK calendarEventRecordPageFields identifiers in call-recorder (#22618) Replaces the hardcoded calendarEventRecordPageFields view/group identifiers in the call-recorder preference view-field with `STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.calendarEvent.views.calendarEventRecordPageFields`, resolving the TODO. The published `twenty-sdk@2.18.0` (already pinned by the app) ships these identifiers with values matching the previously hardcoded ones. Review in cubic --- ...preference-on-calendar-event.view-field.ts | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/twenty-apps/public/call-recorder/src/view-fields/call-recorder-preference-on-calendar-event.view-field.ts b/packages/twenty-apps/public/call-recorder/src/view-fields/call-recorder-preference-on-calendar-event.view-field.ts index 015e66424b..be98ec1a1a 100644 --- a/packages/twenty-apps/public/call-recorder/src/view-fields/call-recorder-preference-on-calendar-event.view-field.ts +++ b/packages/twenty-apps/public/call-recorder/src/view-fields/call-recorder-preference-on-calendar-event.view-field.ts @@ -1,24 +1,23 @@ -import { defineViewField } from 'twenty-sdk/define'; +import { + defineViewField, + STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS, +} from 'twenty-sdk/define'; import { CALL_RECORDER_PREFERENCE_ON_CALENDAR_EVENT_FIELD_UNIVERSAL_IDENTIFIER } from 'src/constants/call-recorder-preference-on-calendar-event-field-universal-identifier'; import { CALL_RECORDER_PREFERENCE_ON_CALENDAR_EVENT_VIEW_FIELD_UNIVERSAL_IDENTIFIER } from 'src/constants/call-recorder-preference-on-calendar-event-view-field-universal-identifier'; -// TODO: hardcoded because the published twenty-sdk (2.14.0) predates the -// calendarEventRecordPageFields view. Replace both with -// STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.calendarEvent.views.calendarEventRecordPageFields -// once the SDK is republished with this view. -const CALENDAR_EVENT_RECORD_PAGE_FIELDS_VIEW_UNIVERSAL_IDENTIFIER = - 'c73668d1-022d-4eaf-b825-4e2548180db6'; -const CALENDAR_EVENT_RECORD_PAGE_FIELDS_GENERAL_GROUP_UNIVERSAL_IDENTIFIER = - 'aeadeb9e-3673-4c0c-8845-f59cb1e6ca42'; +const CALENDAR_EVENT_RECORD_PAGE_FIELDS_VIEW = + STANDARD_OBJECT_UNIVERSAL_IDENTIFIERS.calendarEvent.views + .calendarEventRecordPageFields; export default defineViewField({ universalIdentifier: CALL_RECORDER_PREFERENCE_ON_CALENDAR_EVENT_VIEW_FIELD_UNIVERSAL_IDENTIFIER, viewUniversalIdentifier: - CALENDAR_EVENT_RECORD_PAGE_FIELDS_VIEW_UNIVERSAL_IDENTIFIER, + CALENDAR_EVENT_RECORD_PAGE_FIELDS_VIEW.universalIdentifier, viewFieldGroupUniversalIdentifier: - CALENDAR_EVENT_RECORD_PAGE_FIELDS_GENERAL_GROUP_UNIVERSAL_IDENTIFIER, + CALENDAR_EVENT_RECORD_PAGE_FIELDS_VIEW.viewFieldGroups.general + .universalIdentifier, fieldMetadataUniversalIdentifier: CALL_RECORDER_PREFERENCE_ON_CALENDAR_EVENT_FIELD_UNIVERSAL_IDENTIFIER, position: 8,