Skip to content

feat: 1066 - new parameters for proof upload #1071

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Added 5 parameters for proof upload and update.
  • Among them, readyForPriceTagValidation that is needed for bulk proof upload in Smoothie.
  • Added 4 fields for proofs.
  • Now sharing a common structure for proof upload and update parameters, offering more flexibility and code consistency.

Fixes bug(s)

Part of

Files

New files:

  • common_proof_parameters.dart: Common parameters for the "upload and update proof" API queries, including 5 new fields.
  • create_proof_parameters.dart: Parameters for the "upload proof" API query.

Impacted files:

  • api_prices_test.dart: added more tests around proof upload and update; refactored accordingly
  • open_prices_api_client.dart: changed the parameters of uploadProof for more flexibility
  • openfoodfacts.dart: added the 2 new files
  • proof.dart: added 4 missing fields
  • proof.g.dart: generated
  • update_proof_parameters.dart: moved code to CommonProofParameters

New files:
* `common_proof_parameters.dart`: Common parameters for the "upload and update proof" API queries, including 5 new fields.
* `create_proof_parameters.dart`: Parameters for the "upload proof" API query.

Impacted files:
* `api_prices_test.dart`: added more tests around proof upload and update; refactored accordingly
* `open_prices_api_client.dart`: changed the parameters of `uploadProof` for more flexibility
* `openfoodfacts.dart`: added the 2 new files
* `proof.dart`: added 4 missing fields
* `proof.g.dart`: generated
* `update_proof_parameters.dart`: moved code to `CommonProofParameters`
@monsieurtanuki monsieurtanuki requested a review from teolemon April 27, 2025 07:38
@teolemon teolemon requested a review from raphodn April 28, 2025 13:22
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

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

approving in principle

@github-project-automation github-project-automation bot moved this from In progress to Reviewer approved in Dart package - Support for new APIs and issues Apr 28, 2025
@monsieurtanuki monsieurtanuki merged commit 53b2c42 into openfoodfacts:master Apr 28, 2025
2 of 3 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add new proof upload parameters, including ready_for_price_tag_validation
2 participants