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(api): get records filter should accept uppercase and combined #3460

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

bodinsamuel
Copy link
Collaborator

Changes

  • GET /records filter param should accept uppercase and combined
    I missed that when checking the openapi spec, it's not documented there but it's in the node-client. e.g: ADDED,updated
curl --request GET \
  --url 'http://localhost:3003/records?model=LastSyncDate&limit=100&filter=UPDATED%2Cadded' \
  --header 'Authorization: ' \
  --header 'Connection-Id: 025d9a38-f31c-4a64-b034-57a425761a90' \
  --header 'Provider-Config-Key: unauthenticated' \
  --header 'content-type: application/json'

@bodinsamuel bodinsamuel self-assigned this Feb 5, 2025
@@ -38,6 +38,7 @@ export type ReturnedRecord = {
} & Record<string, RecordValue> & { id: string };

export type LastAction = 'ADDED' | 'UPDATED' | 'DELETED' | 'added' | 'updated' | 'deleted';
export type CombinedFilterAction = `${LastAction},${LastAction}`;
Copy link
Collaborator Author

@bodinsamuel bodinsamuel Feb 5, 2025

Choose a reason for hiding this comment

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

Those are duplicated type, not sure why we are not using @types pkg here

Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe @types didn't exist back then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah maybe, I will make a following PR to sync

@bodinsamuel bodinsamuel requested a review from a team February 5, 2025 17:50
@@ -38,6 +38,7 @@ export type ReturnedRecord = {
} & Record<string, RecordValue> & { id: string };

export type LastAction = 'ADDED' | 'UPDATED' | 'DELETED' | 'added' | 'updated' | 'deleted';
export type CombinedFilterAction = `${LastAction},${LastAction}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe @types didn't exist back then?

@bodinsamuel bodinsamuel merged commit 698ecc0 into master Feb 5, 2025
17 checks passed
@bodinsamuel bodinsamuel deleted the sam/25_02_05/fix/records-filter branch February 5, 2025 17:53
# 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