Options
All
  • Public
  • Public/Protected
  • All
Menu
description

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 activitydata collection.

Note that this class uses the generic Transferable trait to enable a toDTO() method on the model.

todo

Timestamp fields should be numbers to avoid timezone issues.

since

v0.3.2

Hierarchy

Index

Constructors

Properties

address: string

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.

access

public

readonly
var

{string}

calories: number

The activity's calories burned as defined by the data provider. This field is transformed from data providers' output such that it stores the calories burned, not as provided the kilocalories burned.

The calories burned are always expressed in calories (not kCal).

This field is required and indexed.

access

public

readonly
var

{number}

collectionName: string = "activitydata"

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.

access

public

var

{string}

createdAt?: Date

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.

Note that this field's value does not represent the time of creation of an activity but rather the time of creation of it's database entry.

This field is required and indexed.

access

public

readonly
var

{Date}

distance: number

The activity's covered distance as defined by the data provider. This field is used to keep track of the total distance covered by an end-user during individual activities.

The total distance is always expressed in meters.

This field is required and not indexed.

access

public

readonly
var

{number}

elapsedTime: number

The activity's elapsed time as defined by the data provider. This field is used to keep track of the total elapsed time covered by an end-user during individual activities.

The total elapsed time is always expressed in seconds.

This field is required and not indexed.

access

public

readonly
var

{number}

elevation: number

The activity's covered elevation as defined by the data provider. This field is used to keep track of the total elevation gain covered by an end-user during individual activities.

The total elevation gain is always expressed in meters.

This field is required and indexed.

access

public

readonly
var

{number}

endLocation?: GeolocationPointDTO

The geolocation point's GeoJSON object at which the activity was ended, if available.

Note that this field must not be shared publicly as this data is related to private information that the end-user may want to keep private.

The GeolocationPointDTO.coordinates property requires the array of number to use the longitude as the first number and the latitude as the second number in the coordinates.

This field is not required and indexed.

access

public

readonly
var

{string}

hasTrainerDevice: boolean

This property contains a boolean that determines whether this activity was created using a trainer device or training machine.

This field is not required and not indexed.

access

public

readonly
var

{boolean}

isManual: boolean

Determines whether the activity was crafted by hand or if it is the result of an actual activity.

Note that manual activities are not considered for payouts.

access

public

var

{boolean}

kilojoules: number

The activity's work done in kilojoules as defined by the data provider. This applies only to Rides as defined by Strava. As such, this field is not always present.

The total work done is always expressed in kilojoules.

This field is optional and indexed.

access

public

readonly
var

{number}

movingTime: number

The activity's elapsed time as defined by the data provider. This field is used to keep track of the total moving time covered by an end-user during individual activities. This refers to the total time during which the end-user has been in movement during an activity.

The total moving time is always expressed in seconds.

This field is required and not indexed.

access

public

readonly
var

{number}

name?: string

The activity name as stored by the data provider. This field is not always available.

Note that this field must not be shared publicly as this data is related to private information that the end-user may want to keep private.

This field is optional and not indexed.

access

public

readonly
var

{string}

slug: string

The activity slug is composed of the date of the activity, the index of it on a daily basis, the activity identifier and the athlete identifier.

Note that this field can be used to fetch a singular data container for a given entry in activities using the slug field of that collection.

This field is required and indexed and must hold a unique value.

access

public

readonly
var

{string}

sport: string

The activity's sport type as defined by the data provider. This field permits to differentiate the type of activity and corresponding intensity of any activity.

This field is required and indexed.

link

https://developers.strava.com/docs/reference/#api-models-SportType

access

public

readonly
var

{string}

startLocation?: GeolocationPointDTO

The geolocation point's GeoJSON object at which the activity was started, if available.

Note that this field must not be shared publicly as this data is related to private information that the end-user may want to keep private.

The GeolocationPointDTO.coordinates property requires the array of number to use the longitude as the first number and the latitude as the second number in the coordinates.

This field is not required and indexed.

access

public

readonly
var

{string}

startedAt: number

The UTC timestamp at which the activity was started. Note that this time is expressed using the UTC timezone and may differ from the end-users actual timezone.

Note that this field must not be shared publicly as this data is related to private information that the end-user may want to keep private.

Conversion to the end-users local timezone can be done using the ActivityData.timezone field and applying it to this field value.

This field is required and indexed.

access

public

readonly
var

{number}

sufferScore: number

The suffer score attributed to this activity by Strava. We store a copy of this value so that we can evaluate its usage in our formulas.

Note that this field is sometimes null when received from Strava, in those cases this field is set to -1.

access

public

var

{sufferScore}

timezone: string

The UTC timestamp at which the activity was started. Note that this time is expressed using the UTC timezone and may differ from the end-users actual timezone.

Note that this field must not be shared publicly as this data is related to private information that the end-user may want to keep private.

Conversion to the end-users local timezone can be done using the timeZone field and applying it to this field value.

This field is required and indexed.

access

public

readonly
var

{string}

updatedAt?: Date

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 field is optional and not indexed.

access

public

readonly
var

{Date}

Accessors

  • get toQuery(): Record<string, unknown>
  • This method implements a specialized query format to query items individually, as documents, in the collection: account_integrations.

    access

    public

    Returns Record<string, unknown>

    The individual document data that is used in a query.

Methods

Generated using TypeDoc