Closed aurelticot closed 2 months ago
(Providers, Provider Handlers, Provider Options and Provider Handler Options)
There are:
Consider the duo id and label. Avoid name which is ambiguous whether it's an id or label.
Will migrate to consistent name of:
Make a decision between options and config and stay consistent across defintions and instances. I personally prefer config.
These are intentionally different. options
refers to the configurable options for a provider, whereas config
refers to the actual config specified for those options.
(Providers, Provider Handlers, Provider Options and Provider Handler Options)
There are:
- Providers (ie: Google)
- Provider Handles (ie: Gmail)
- Provider Options (ie: batchSize)
- Provider Handler Options (ie: Gmail batchSize)
- Connections (ie: Chris' Google)
- Connection Config (ie: Chris' Google batchSize)
- Connection Handler Config (ie: Chris' Google Gmail batchSize)
Yes. I didn't extend on it but my point was the Providers-related object are read objects defining (definitions) a given provider, an handler, an option, etc. and not related to a user, while the Connections-related are object instances for a given user's connection and are updatable (the config, the status, etc.).
But it's just a mental model to then highlight the consistency issues, I have no problemw with these object per se.
Consider the duo id and label. Avoid name which is ambiguous whether it's an id or label.
Will migrate to consistent name of:
- providerId (was provider / providerName)
- accountId (was providerId)
- handlerId (was handler / handlerName)
Thanks
Make a decision between options and config and stay consistent across defintions and instances. I personally prefer config.
These are intentionally different.
options
refers to the configurable options for a provider, whereasconfig
refers to the actual config specified for those options.
Could it be configOptions
instead of options
? So we see the link with config
.
Could it be
configOptions
instead ofoptions
? So we see the link withconfig
.
Yep, ok.
There are inconsistencies across the API regarding the terminologies and the property names, for instance the provider handler definition have an
id
but are elsewhere referenced ashandlerName
.Here's the response of the
/providers
endpoint:Here's the response of the
/sync/status
endpoint:Suggestions
id
andlabel
. Avoidname
which is ambiguous whether it's an id or label.options
andconfig
and stay consistent across defintions and instances. I personally prefer config.Provider
objectConnection
object (Verida record)ConnectionHandler
object (Verida record)Endpoints
The
/sync
and thesync/status
endpoints take aprovider
andproviderId
search params, which would beproviderId
andaccountId
insteadThe
/provider/disconnect/:provider
endpoint takes aproviderId
search param which would beaccountId
.Internally, it would also be good to update the variables and other references to match the new terminology. For instance, but not exhaustive, the
/provider/disconnect/:provider
endpoint would be/provider/disconnect/:providerId
.