-
Notifications
You must be signed in to change notification settings - Fork 5
Feat/Add Attestations API Endpoint #422
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
Feat/Add Attestations API Endpoint #422
Conversation
We need the system to likely support multiple languages, which means attestations need to specify a locale, as legal language is very specific and likely cannot be auto-translated. This adds the locale to the SK and record data to keep locales decoupled from one another.
1d87621
to
c6938a7
Compare
pip-compile was issuing this warning: WARNING: --strip-extras is becoming the default in version 8.0.0. To silence this warning, either use --strip-extras to opt into the new default or use --no-strip-extras to retain the existing behavior.
This will allow us to query for all attestations within a compact for a locale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! A couple of questions mostly:
...mpact-connect/stacks/transaction_monitoring_stack/transaction_history_processing_workflow.py
Outdated
Show resolved
Hide resolved
- setting max length for new attestation fields - enable alarm, but disable alarm action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Ready for you, @jlkravitz .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! couple nits
backend/compact-connect/lambdas/python/custom-resources/handlers/compact_config_uploader.py
Outdated
Show resolved
Hide resolved
backend/compact-connect/lambdas/python/provider-data-v1/tests/function/__init__.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@isabeleliassen Good to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@isabeleliassen Good to merge. Sorry about that!
We are required to track the historical version of attestations to show what attestation text a user agreed to when they performed an action in the system. This adds the schema design for attestation version records, which we will be storing in the Compact Configuration Table. This adds a new endpoint
GET /v1/compacts/{compact}/attestations/{attestationId}
that retrieves the latest version of an attestation text by its ID.We need the system to likely support multiple languages, which means attestations need to specify a locale, as legal language is very specific and likely cannot be auto-translated. This adds the locale to the SK and record data to keep locales decoupled from one another.
The Attestation records will be stored according to the following pk and sk pattern:
and will contain the following fields given in the example below:
Requirements List
Description List
AttestationRecordSchema
for serializing/deserializing attestation records with version trackingCompactConfigurationClient
with a method to fetch the latest version of an attestation using DynamoDB's sort key functionalityTesting List
backend/compact-connect/tests/unit/test_api.py
Closes #304