Create fields for calendar and messaging settings v2 (#6049)
Create fields for calendar and messaging settings v2
This commit is contained in:
@ -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