Skip to main content

@swamp/gcp/fitness

v2026.04.23.1

Google Cloud fitness infrastructure models

Repository

https://github.com/systeminit/swamp-extensions

Labels

gcpgoogle-cloudfitnesscloudinfrastructure

Contents

Quality score

Verified by Swamp

How well-documented and verifiable this extension is.

100%

Grade A

  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • At least one platform tag (or universal)1/1earned
  • Two or more platform tags (or universal)1/1earned
  • License declared1/1earned
  • Verified public repository2/2earned

Install

$ swamp extension pull @swamp/gcp/fitness

@swamp/gcp/fitness/users-datasourcesv2026.04.23.1users_datasources.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
application?object
dataStreamId?stringA unique identifier for the data stream produced by this data source. The identifier includes: - The physical device's manufacturer, model, and serial number (UID). - The application's package name or name. Package name is used when the data source was created by an Android application. The developer project number is used when the data source was created by a REST client. - The data source's type. - The data source's stream name. Note that not all attributes of the data source are used as part
dataStreamName?stringThe stream name uniquely identifies this particular data source among other data sources of the same type from the same underlying producer. Setting the stream name is optional, but should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
dataType?object
device?objectRepresentation of an integrated device (such as a phone or a wearable) that can hold sensors. Each sensor is exposed as a data source. The main purpose of the device information contained in this class is to identify the hardware of a particular data source. This can be useful in different ways, including: - Distinguishing two similar sensors on different devices (the step counter on two nexus 5 phones, for instance) - Display the source of data to the user (by using the device make / model) - T
typeenumA constant describing the type of this data source. Indicates whether this data source produces raw or derived data.
userIdstringCreate the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
createCreate a dataSources
getGet a dataSources
ArgumentTypeDescription
identifierstringThe name of the dataSources
updateUpdate dataSources attributes
deleteDelete the dataSources
ArgumentTypeDescription
identifierstringThe name of the dataSources
syncSync dataSources state from GCP

Resources

state(infinite)— Definition of a unique source of sensor data. Data sources can expose raw dat...
@swamp/gcp/fitness/users-datasources-datapointchangesv2026.04.23.1users_datasources_datapointchanges.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
getGet a dataPointChanges
ArgumentTypeDescription
identifierstringThe name of the dataPointChanges
syncSync dataPointChanges state from GCP

Resources

state(infinite)— Represents a single data point, generated by a particular data source. A data...
@swamp/gcp/fitness/users-datasources-datasetsv2026.04.23.1users_datasources_datasets.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
dataSourceId?stringThe data stream ID of the data source that created the points in this dataset.
maxEndTimeNs?stringThe largest end time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the second part of the dataset identifier.
minStartTimeNs?stringThe smallest start time of all data points in this possibly partial representation of the dataset. Time is in nanoseconds from epoch. This should also match the first part of the dataset identifier.
nextPageToken?stringThis token will be set when a dataset is received in response to a GET request and the dataset is too large to be included in a single response. Provide this value in a subsequent GET request to return the next page of data points within this dataset.
point?arrayA partial list of data points contained in the dataset, ordered by endTimeNanos. This list is considered complete when retrieving a small dataset and partial when patching a dataset or retrieving a dataset that is too large to include in a single response.
getGet a datasets
ArgumentTypeDescription
identifierstringThe name of the datasets
updateUpdate datasets attributes
deleteDelete the datasets
ArgumentTypeDescription
identifierstringThe name of the datasets
syncSync datasets state from GCP

Resources

state(infinite)— A dataset represents a projection container for data points. They do not carr...
@swamp/gcp/fitness/users-sessionsv2026.04.23.1users_sessions.ts

Global Arguments

ArgumentTypeDescription
activeTimeMillis?stringSession active time. While start_time_millis and end_time_millis define the full session time, the active time can be shorter and specified by active_time_millis. If the inactive time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
activityType?numberThe type of activity this session represents.
application?object
description?stringA description for this session.
endTimeMillis?stringAn end time, in milliseconds since epoch, inclusive.
id?stringA client-generated identifier that is unique across all sessions owned by this particular user.
modifiedTimeMillis?stringA timestamp that indicates when the session was last modified.
name?stringA human readable name of the session.
startTimeMillis?stringA start time, in milliseconds since epoch, inclusive.
getGet a sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
updateUpdate sessions attributes
deleteDelete the sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
syncSync sessions state from GCP

Resources

state(infinite)— Sessions contain metadata, such as a user-friendly name and time interval inf...