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
Is your feature request related to a problem? Please describe.
Based on this discussion we should add a api/vi/contact endpoint (in addition to person and place) that will return return generic contact data (given the identifier for either a person or a place).
There are a number of situations in the CHT data model where one might have a contact identifier, but not know what type of contact it is associated with. (E.g. a report can be associated with a contact, but there is no guarantee if the contact is a person or a place).
Describe the solution you'd like
The api/vi/contact endpoint should support returning the full data for the person/place (implemented via cht-datasource) but under the generic Contact interface.
In cht-datasource we should move the Contact interface into a v1 namespace since it will be exposed as a first-class data type. We should also look at exporting some type assertion helper functions to confirm if a Contact is a Person or a Place.
Describe alternatives you've considered
Just not supporting getting generic contacts and trying to update the various places in the data-model to always know the type.
Add an endpoint for just getting the type of a contact (so you knew whether to get the entity from the person/place endpoint).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Based on this discussion we should add a
api/vi/contact
endpoint (in addition toperson
andplace
) that will return return generic contact data (given the identifier for either a person or a place).There are a number of situations in the CHT data model where one might have a contact identifier, but not know what type of contact it is associated with. (E.g. a report can be associated with a contact, but there is no guarantee if the contact is a person or a place).
Describe the solution you'd like
The
api/vi/contact
endpoint should support returning the full data for the person/place (implemented via cht-datasource) but under the generic Contact interface.In cht-datasource we should move the
Contact
interface into av1
namespace since it will be exposed as a first-class data type. We should also look at exporting some type assertion helper functions to confirm if aContact
is aPerson
or aPlace
.Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: