feat(messaging): webhook push sync for Gmail, Calendar and Microsoft (#21970)
<!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/twentyhq/twenty/pull/21970?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
This commit is contained in:
+20
@@ -17,6 +17,7 @@ import {
|
||||
CalendarChannelSyncStage,
|
||||
CalendarChannelSyncStatus,
|
||||
CalendarChannelVisibility,
|
||||
WebhookSubscriptionStatus,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity';
|
||||
@@ -97,6 +98,25 @@ export class CalendarChannelEntity extends WorkspaceRelatedEntity {
|
||||
@Column({ type: 'integer', nullable: false, default: 0 })
|
||||
throttleFailureCount: number;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
webhookSubscriptionExternalId: string | null;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
webhookSubscriptionExternalResourceId: string | null;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
webhookSubscriptionClientState: string | null;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: WebhookSubscriptionStatus,
|
||||
nullable: true,
|
||||
})
|
||||
webhookSubscriptionStatus: WebhookSubscriptionStatus | null;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
webhookSubscriptionExpiresAt: Date | null;
|
||||
|
||||
@Column({ type: 'uuid', nullable: false })
|
||||
connectedAccountId: string;
|
||||
|
||||
|
||||
+17
@@ -21,6 +21,7 @@ import {
|
||||
MessageChannelType,
|
||||
MessageChannelVisibility,
|
||||
MessageFolderImportPolicy,
|
||||
WebhookSubscriptionStatus,
|
||||
} from 'twenty-shared/types';
|
||||
|
||||
import { ConnectedAccountEntity } from 'src/engine/metadata-modules/connected-account/entities/connected-account.entity';
|
||||
@@ -139,6 +140,22 @@ export class MessageChannelEntity extends WorkspaceRelatedEntity {
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
throttleRetryAfter: Date | null;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
webhookSubscriptionExternalId: string | null;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
webhookSubscriptionClientState: string | null;
|
||||
|
||||
@Column({
|
||||
type: 'enum',
|
||||
enum: WebhookSubscriptionStatus,
|
||||
nullable: true,
|
||||
})
|
||||
webhookSubscriptionStatus: WebhookSubscriptionStatus | null;
|
||||
|
||||
@Column({ type: 'timestamptz', nullable: true })
|
||||
webhookSubscriptionExpiresAt: Date | null;
|
||||
|
||||
@Column({ type: 'uuid', nullable: false })
|
||||
connectedAccountId: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user