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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 45 additions and 0 deletions

View File

@ -70,6 +70,8 @@ export const CALENDAR_CHANNEL_STANDARD_FIELD_IDS = {
isSyncEnabled: '20202020-fe19-4818-8854-21f7b1b43395',
syncCursor: '20202020-bac2-4852-a5cb-7a7898992b70',
calendarChannelEventAssociations: '20202020-afb0-4a9f-979f-2d5087d71d09',
throttlePauseUntil: '20202020-16e8-40ca-be79-a3af4787af2c',
throttleFailureCount: '20202020-525c-4b76-b9bd-0dd57fd11d61',
};
export const CALENDAR_EVENT_PARTICIPANT_STANDARD_FIELD_IDS = {
@ -208,6 +210,8 @@ export const MESSAGE_CHANNEL_STANDARD_FIELD_IDS = {
syncStatus: '20202020-56a1-4f7e-9880-a8493bb899cc',
syncSubStatus: '20202020-7979-4b08-89fe-99cb5e698767',
ongoingSyncStartedAt: '20202020-8c61-4a42-ae63-73c1c3c52e06',
throttlePauseUntil: '20202020-a8cb-475b-868c-b83538614df4',
throttleFailureCount: '20202020-0291-42be-9ad0-d578a51684ab',
};
export const MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS = {

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,