The account's address. An address typically refers to a
human-readable series of 39 characters, starting either with
a T
, for TESTNET addresses, or with a N
, for MAINNET addresses.
This field is required and indexed.
This field is used in a verification step to make
sure that only the owner of an OAuth integration can
update this integration.
The authorization URL is built using the end-user's
address and a possible referral code.
This field is required and indexed.
This field contains the mongo collection name for entries
that are stored using AccountIntegrationDocument or the model
AccountIntegrationModel.
Note that this field is not part of document properties
and used only internally to perform queries that refer to
an individual collection name, e.g. $unionWith
.
The document's creation timestamp. This field does not reflect the date of creation of an integration but rather the date of creation of the cached database entry.
This field contains an encrypted access token which
uses the seed in OAuthService.getEncryptionSeed.
This field is optional and not indexed.
This field contains an encrypted refresh token which
uses the seed in OAuthService.getEncryptionSeed.
This field is optional and not indexed.
The short-lived access token's expiration time. This is the number of
milliseconds since the UTC epoch, representing the time at which
the access token will expire.
Note that this field is explicitly converted to contain milliseconds
rather than seconds, such that resulting timestamps can be used in TS.
The OAuth integration provider name. This is usually
the name of the platform of which an account is being
linked to the dApp.
This field is required and indexed.
This field contains the remote identifier. This is
usually the identifier of the account on the third
party platform, e.g. the athlete identifier in Strava.
This field is optional and indexed.
The document's update timestamp. This field does not reflect the date of update of an integration but rather the date of update of the cached database entry.
This method implements a specialized query format to query items
individually, as documents, in the collection: account_integrations
.
The individual document data that is used in a query.
This static method populates a AccountIntegrationDTO object from the values of a AccountIntegrationDocument as presented by mongoose queries.
The document as received from mongoose.
The DTO object that will be populated with values.
The dto
object with fields set.
Generated using TypeDoc
This class defines the exact fields that are stored in the corresponding MongoDB documents. It should be used whenever database documents are being handled or read for the
account_integrations
collection.Note that this class uses the generic Transferable trait to enable a
toDTO()
method on the model.Timestamp fields should be numbers to avoid timezone issues.
v0.3.0