5613 add throttlepauseuntil and throttlefailurecount fields to messagechannel and calendarchannel (#5713)

Closes #5613
This commit is contained in:
bosiraphael
2024-06-03 13:22:49 +02:00
committed by GitHub
parent 7fa05bf539
commit 2d12984db4
3 changed files with 45 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import { WorkspaceIsSystem } from 'src/engine/twenty-orm/decorators/workspace-is
import { WorkspaceIsNotAuditLogged } from 'src/engine/twenty-orm/decorators/workspace-is-not-audit-logged.decorator';
import { WorkspaceField } from 'src/engine/twenty-orm/decorators/workspace-field.decorator';
import { WorkspaceRelation } from 'src/engine/twenty-orm/decorators/workspace-relation.decorator';
import { WorkspaceIsNullable } from 'src/engine/twenty-orm/decorators/workspace-is-nullable.decorator';
export enum CalendarChannelVisibility {
METADATA = 'METADATA',
@ -96,6 +97,26 @@ export class CalendarChannelWorkspaceEntity extends BaseWorkspaceEntity {
})
syncCursor: string;
@WorkspaceField({
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.throttlePauseUntil,
type: FieldMetadataType.DATE_TIME,
label: 'Throttle Pause Until',
description: 'Throttle Pause Until',
icon: 'IconPlayerPause',
})
@WorkspaceIsNullable()
throttlePauseUntil: Date;
@WorkspaceField({
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.throttleFailureCount,
type: FieldMetadataType.NUMBER,
label: 'Throttle Failure Count',
description: 'Throttle Failure Count',
icon: 'IconX',
defaultValue: 0,
})
throttleFailureCount: number;
@WorkspaceRelation({
standardId: CALENDAR_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: RelationMetadataType.MANY_TO_ONE,

View File

@ -284,6 +284,26 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
@WorkspaceIsNullable()
ongoingSyncStartedAt: string;
@WorkspaceField({
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.throttlePauseUntil,
type: FieldMetadataType.DATE_TIME,
label: 'Throttle Pause Until',
description: 'Throttle Pause Until',
icon: 'IconPlayerPause',
})
@WorkspaceIsNullable()
throttlePauseUntil: Date;
@WorkspaceField({
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.throttleFailureCount,
type: FieldMetadataType.NUMBER,
label: 'Throttle Failure Count',
description: 'Throttle Failure Count',
icon: 'IconX',
defaultValue: 0,
})
throttleFailureCount: number;
@WorkspaceRelation({
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.connectedAccount,
type: RelationMetadataType.MANY_TO_ONE,