Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Delete improvements #975

Closed
2 tasks done
bastienbeurier opened this issue Sep 7, 2023 · 0 comments · Fixed by #1000
Closed
2 tasks done

Delete improvements #975

bastienbeurier opened this issue Sep 7, 2023 · 0 comments · Fixed by #1000
Assignees
Labels
enhancement New feature or request

Comments

@bastienbeurier
Copy link
Member

bastienbeurier commented Sep 7, 2023

@khaliqgant recently added the ability to detect deletions in sync scripts in two ways:

  • call batchDelete in the sync script
  • configure the detect_deletes option in nango.yaml + return all records each time in the sync script (i.e. full sync)

Now we should improve the interface for reading deletes from the API + backend SDK.

In the nango.getRecords response, we should return metadata along with each record in a _nango_metadata field which would contain update at, created at, delete at information, etc. This should not be a breaking change. Deletes records should be returned as well.

We should add the deleted count to the webhook payload.

We should deprecate the includeNangoMetadata field (because the metadata will be return all the time). For now, if people do use this includeNangoMetadata, we should return the records in the format that we used to, to avoid a breaking change (i.e. metadata in an object wrapping the record object).


Implemented Features

  • deleted property for the webhook is no longer optional and is always provided
  • getRecords from the sdk now has the _nango_metadata type included along with a generic
@bastienbeurier bastienbeurier added the enhancement New feature or request label Sep 7, 2023
khaliqgant added a commit that referenced this issue Sep 13, 2023
khaliqgant added a commit that referenced this issue Sep 13, 2023
khaliqgant added a commit that referenced this issue Sep 13, 2023
khaliqgant added a commit that referenced this issue Sep 13, 2023
khaliqgant added a commit that referenced this issue Sep 13, 2023
khaliqgant added a commit that referenced this issue Sep 14, 2023
khaliqgant added a commit that referenced this issue Sep 14, 2023
* [gh-#975] move data related services to its own directory

* [gh-#975] fix remaining reference

* [gh-#975] remove queryTimeStamp if sync is initial

Resolves #994

* [gh-#975] deleted property isn't optional

* [gh-#975] add nango_metadata property to all results

* [gh-#975] add metadata

* [gh-#975] test fixing and type improvements

* [gh-#975] fix tests and extract record property

* [gh-#975] types update

* [gh-#975] docs update

* [gh-#975] null for queryTimeStamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants