Skip to content

Commit

Permalink
5613 add throttlepauseuntil and throttlefailurecount fields to messag…
Browse files Browse the repository at this point in the history
…echannel and calendarchannel (#5713)

Closes #5613
  • Loading branch information
bosiraphael authored Jun 3, 2024
1 parent 7fa05bf commit 2d12984
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2d12984

Please sign in to comment.