You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, these UIs don't provide any detailed accounting of the award calculations for each referral.
Goals
For the scope of this issue, we want to create an all new "Referrals" API that would replace the use of the "Registrar Actions" API in the contexts listed in the "Background" section above.
Enable the ENSAwards site to make an update where all existing functionality is retained through the new "Referrals" API and all use of the "Registrar Actions" API within the ENSAwards site can be removed.
ENSAwards should be able to stop making use of the EnsApiClient to ask for "Registrar Actions" data.
ENSAwards should instead be able to make use of the ENSReferralsClient to ask for "Referrals" data.
Update the new "Referrals" API so that (compared with the Registrar Actions API) it exposes query params that are more aligned with the other referral-related APIs supported by ENSReferralsClient.
A number of additional specializations and updates to the "Referrals" API will be planned and executed in separate future issues (such as to provide a detailed accounting of the award calculations for each referral). However, for the scope of this issue, we are generally working only to make this new "Referrals" API exist.
New API
Suggest to make the new "Referrals" API endpoint available through a route such as /v1/ensanalytics/referrals
Query Param Refinements (for new "Referrals" API)
withReferral: Remove this as a query param. Instead, within the backend implementation of the new "Referrals" API, we should act as if this param is always set to true. The backend implementation of the new "Referrals" API, we should exclusively return referrals that are associated with one of the configured editions.
byDecodedReferrer: Rename this query param to referrer. We should retain the ability to optionally filter by a referrer. This is needed for the "ENS Advocate" detail pages on ENSAwards.
beginTimestamp and endTimestamp: Let's completely remove these as query params for now. We aren't using them currently and it will introduce complexity with some of our future steps to keep them.
byParentNode: Remove this as a query param. Instead, within the backend implementation of the new "Referrals" API, we should exclusively return referrals that are associated with one of the configured editions.
All of the pagination-related query params: Please advise your suggested handling for this. Should we continue implementing this as offset-based pagination, or should we change to implementing this as cursor-based pagination? I assume that for now we would want to continue implementing the same offset-based pagination strategy?
Note the ways we're already using the "Registrar Actions" API on ENSAwards that are referenced above in the "Background Info" section. We need to continue delivering those features.
We should continue to only support sorting by latest referrals, newest first.
Background
Goals
EnsApiClientto ask for "Registrar Actions" data.ENSReferralsClientto ask for "Referrals" data.ENSReferralsClient.New API
/v1/ensanalytics/referralsQuery Param Refinements (for new "Referrals" API)
withReferral: Remove this as a query param. Instead, within the backend implementation of the new "Referrals" API, we should act as if this param is always set totrue. The backend implementation of the new "Referrals" API, we should exclusively return referrals that are associated with one of the configured editions.byDecodedReferrer: Rename this query param toreferrer. We should retain the ability to optionally filter by a referrer. This is needed for the "ENS Advocate" detail pages on ENSAwards.beginTimestampandendTimestamp: Let's completely remove these as query params for now. We aren't using them currently and it will introduce complexity with some of our future steps to keep them.byParentNode: Remove this as a query param. Instead, within the backend implementation of the new "Referrals" API, we should exclusively return referrals that are associated with one of the configured editions.