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

[SDK-3642] feat: support complex field names in export_users #387

Merged
merged 4 commits into from
Oct 7, 2022

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented Oct 5, 2022

Changes

This PR tweaks export_users so that it could now accept (and properly forward) field names and export_as settings to the jobs/users-exports endpoint. Previously it was only possible to specify an array of field strings. Now, objects can be specified meaning that the export_as property can be specified.

This is done in a backwards-compatible way so as not to break those still sending string arrays.

Usage example:

auth0.export_users(
  fields: [{ name: 'author', export_as: 'creator' }],
  connection_id: 'test-connection',
  format: 'csv',
  limit: 10
)

References

Fixes #378

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of Ruby

Checklist

@stevehobbsdev stevehobbsdev added the review:small Small review label Oct 5, 2022
@stevehobbsdev stevehobbsdev requested a review from a team as a code owner October 5, 2022 14:20
@stevehobbsdev stevehobbsdev changed the title feat: support complex field names in export_users [SDK-3642] feat: support complex field names in export_users Oct 5, 2022
@stevehobbsdev stevehobbsdev merged commit 867d36e into master Oct 7, 2022
@stevehobbsdev stevehobbsdev deleted the sdk-3642/fields-for-export branch October 7, 2022 13:31
@stevehobbsdev stevehobbsdev mentioned this pull request Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I want to pass a list of hash as a fields parameter in user exports
2 participants