Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(types): SyncConfig -> DBSyncConfig #3459

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

bodinsamuel
Copy link
Collaborator

Changes

Fixes https://linear.app/nango/issue/NAN-2547/fix-old-casing-of-sync-type

Initially wanted to only fix the SyncType casing but it was a good time to fix the entire type

  • SyncConfig -> DBSyncConfig
  • Clarify SyncType -> SyncJobsType
  • Clarify SyncType -> SyncOperationType
  • Fix getUniqueSyncsByProviderConfig type

@bodinsamuel bodinsamuel self-assigned this Feb 5, 2025
Copy link

linear bot commented Feb 5, 2025

@bodinsamuel bodinsamuel marked this pull request as ready for review February 5, 2025 16:54
@bodinsamuel bodinsamuel requested a review from a team February 5, 2025 16:54
@@ -37,6 +40,6 @@ export interface IntegrationWithCreds extends Integration {
export interface Integration {
unique_key: string;
provider: string;
syncs: SyncConfig[];
syncs: (Pick<DBSyncConfig, 'created_at' | 'updated_at'> & { name: string; description: string | null })[];
actions: Action[];
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This type was completely wrong

deleted: false,
active: true,
type: 'sync'
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type was very wrong, thankfully it was only used once

@@ -4,4 +4,4 @@ export interface SyncResult {
deleted: number;
}

export type SyncType = 'INCREMENTAL' | 'FULL' | 'WEBHOOK';
export type SyncOperationType = 'INCREMENTAL' | 'FULL' | 'WEBHOOK';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to rename this one to something that is not sync type.

@bodinsamuel bodinsamuel merged commit 966421f into master Feb 6, 2025
17 checks passed
@bodinsamuel bodinsamuel deleted the sam/25_02_05/fix/dbsyncconfig branch February 6, 2025 09:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants