Create fields for calendar and messaging settings v2 (#6049)
Create fields for calendar and messaging settings v2
This commit is contained in:
@ -40,6 +40,13 @@ export enum CalendarChannelSyncStage {
|
||||
FAILED = 'FAILED',
|
||||
}
|
||||
|
||||
export enum CalendarChannelContactAutoCreationPolicy {
|
||||
AS_PARTICIPANT_AND_ORGANIZER = 'AS_PARTICIPANT_AND_ORGANIZER',
|
||||
AS_PARTICIPANT = 'AS_PARTICIPANT',
|
||||
AS_ORGANIZER = 'AS_ORGANIZER',
|
||||
NONE = 'NONE',
|
||||
}
|
||||
|
||||
@WorkspaceEntity({
|
||||
standardId: STANDARD_OBJECT_IDS.calendarChannel,
|
||||
namePlural: 'calendarChannels',
|
||||
@ -186,6 +193,44 @@ export class CalendarChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
})
|
||||
isContactAutoCreationEnabled: boolean;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.contactAutoCreationPolicy,
|
||||
type: FieldMetadataType.SELECT,
|
||||
label: 'Contact auto creation policy',
|
||||
description:
|
||||
'Automatically create records for people you participated with in an event.',
|
||||
icon: 'IconUserCircle',
|
||||
options: [
|
||||
{
|
||||
value:
|
||||
CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT_AND_ORGANIZER,
|
||||
label: 'As Participant and Organizer',
|
||||
color: 'green',
|
||||
position: 0,
|
||||
},
|
||||
{
|
||||
value: CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT,
|
||||
label: 'As Participant',
|
||||
color: 'orange',
|
||||
position: 1,
|
||||
},
|
||||
{
|
||||
value: CalendarChannelContactAutoCreationPolicy.AS_ORGANIZER,
|
||||
label: 'As Organizer',
|
||||
color: 'blue',
|
||||
position: 2,
|
||||
},
|
||||
{
|
||||
value: CalendarChannelContactAutoCreationPolicy.NONE,
|
||||
label: 'None',
|
||||
color: 'red',
|
||||
position: 3,
|
||||
},
|
||||
],
|
||||
defaultValue: `'${CalendarChannelContactAutoCreationPolicy.AS_PARTICIPANT_AND_ORGANIZER}'`,
|
||||
})
|
||||
contactAutoCreationPolicy: CalendarChannelContactAutoCreationPolicy;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
|
||||
@ -52,6 +52,12 @@ export enum MessageChannelType {
|
||||
SMS = 'sms',
|
||||
}
|
||||
|
||||
export enum MessageChannelContactAutoCreationPolicy {
|
||||
SENT_AND_RECEIVED = 'SENT_AND_RECEIVED',
|
||||
SENT = 'SENT',
|
||||
NONE = 'NONE',
|
||||
}
|
||||
|
||||
@WorkspaceEntity({
|
||||
standardId: STANDARD_OBJECT_IDS.messageChannel,
|
||||
namePlural: 'messageChannels',
|
||||
@ -126,6 +132,7 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
})
|
||||
type: string;
|
||||
|
||||
// TODO: Deprecate this field and migrate data to contactAutoCreationFor
|
||||
@WorkspaceField({
|
||||
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isContactAutoCreationEnabled,
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
@ -136,6 +143,57 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
|
||||
})
|
||||
isContactAutoCreationEnabled: boolean;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.contactAutoCreationPolicy,
|
||||
type: FieldMetadataType.SELECT,
|
||||
label: 'Contact auto creation policy',
|
||||
description:
|
||||
'Automatically create People records when receiving or sending emails',
|
||||
icon: 'IconUserCircle',
|
||||
options: [
|
||||
{
|
||||
value: MessageChannelContactAutoCreationPolicy.SENT_AND_RECEIVED,
|
||||
label: 'Sent and Received',
|
||||
position: 0,
|
||||
color: 'green',
|
||||
},
|
||||
{
|
||||
value: MessageChannelContactAutoCreationPolicy.SENT,
|
||||
label: 'Sent',
|
||||
position: 1,
|
||||
color: 'blue',
|
||||
},
|
||||
{
|
||||
value: MessageChannelContactAutoCreationPolicy.NONE,
|
||||
label: 'None',
|
||||
position: 2,
|
||||
color: 'red',
|
||||
},
|
||||
],
|
||||
defaultValue: `'${MessageChannelContactAutoCreationPolicy.SENT}'`,
|
||||
})
|
||||
contactAutoCreationPolicy: MessageChannelContactAutoCreationPolicy;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.excludeNonProfessionalEmails,
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
label: 'Exclude non professional emails',
|
||||
description: 'Exclude non professional emails',
|
||||
icon: 'IconBriefcase',
|
||||
defaultValue: true,
|
||||
})
|
||||
excludeNonProfessionalEmails: boolean;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.excludeGroupEmails,
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
label: 'Exclude group emails',
|
||||
description: 'Exclude group emails',
|
||||
icon: 'IconUsersGroup',
|
||||
defaultValue: true,
|
||||
})
|
||||
excludeGroupEmails: boolean;
|
||||
|
||||
@WorkspaceField({
|
||||
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.isSyncEnabled,
|
||||
type: FieldMetadataType.BOOLEAN,
|
||||
|
||||
Reference in New Issue
Block a user