Skip to main content

Gcp/fitness

@swamp/gcp/fitnessv2026.07.21.3· 6d agoMODELS
01README

Google Cloud fitness infrastructure models

02Release Notes
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
03Models4
@swamp/gcp/fitness/users-datasourcesv2026.07.21.3users_datasources.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
accessToken?stringGCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
credentialsJson?stringGCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault.
project?stringGCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables.
scopes?stringComma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes.
application?objectInformation about an application which feeds sensor data into the platform.
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?objectThe data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API.
device?objectRepresentation of an integrated device (such as a phone or a wearable) that can hold sensors.
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.
fn create()
Create a dataSources
fn get(identifier: string)
Get a dataSources
ArgumentTypeDescription
identifierstringThe name of the dataSources
fn update(identifier?: string)
Update dataSources attributes
ArgumentTypeDescription
identifier?stringTarget a specific dataSources by name (e.g. one discovered by list)
fn delete(identifier: string)
Delete the dataSources
ArgumentTypeDescription
identifierstringThe name of the dataSources
fn sync(identifier?: string)
Sync dataSources state from GCP
ArgumentTypeDescription
identifier?stringTarget a specific dataSources by name (e.g. one discovered by list)
fn list(dataTypeName?: string, maxPages?: number)
List dataSources resources
ArgumentTypeDescription
dataTypeName?stringThe names of data types to include in the list. If not specified, all data sources will be returned.
maxPages?numberMaximum number of pages to fetch (default: 10)

Resources

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

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
accessToken?stringGCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
credentialsJson?stringGCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault.
project?stringGCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables.
scopes?stringComma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes.
userIdstringList data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
dataSourceIdstringThe data stream ID of the data source that created the dataset.
fn get(identifier: string)
Get a dataPointChanges
ArgumentTypeDescription
identifierstringThe name of the dataPointChanges
fn sync(identifier?: string)
Sync dataPointChanges state from GCP
ArgumentTypeDescription
identifier?stringTarget a specific dataPointChanges by name (e.g. one discovered by list)
fn list(limit?: number, maxPages?: number)
List dataPointChanges resources
ArgumentTypeDescription
limit?numberIf specified, no more than this many data point changes will be included in the response.
maxPages?numberMaximum number of pages to fetch (default: 10)

Resources

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

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
accessToken?stringGCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
credentialsJson?stringGCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault.
project?stringGCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables.
scopes?stringComma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes.
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.
userIdstringRetrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
fn get(identifier: string)
Get a datasets
ArgumentTypeDescription
identifierstringThe name of the datasets
fn update(identifier?: string)
Update datasets attributes
ArgumentTypeDescription
identifier?stringTarget a specific datasets by name (e.g. one discovered by list)
fn delete(identifier: string)
Delete the datasets
ArgumentTypeDescription
identifierstringThe name of the datasets
fn sync(identifier?: string)
Sync datasets state from GCP
ArgumentTypeDescription
identifier?stringTarget a specific datasets by name (e.g. one discovered by list)

Resources

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

Global Arguments

ArgumentTypeDescription
accessToken?stringGCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault.
credentialsJson?stringGCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault.
project?stringGCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables.
scopes?stringComma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes.
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?objectThe application that created the session.
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.
userIdstringCreate sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
fn get(identifier: string)
Get a sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
fn update(identifier?: string)
Update sessions attributes
ArgumentTypeDescription
identifier?stringTarget a specific sessions by name (e.g. one discovered by list)
fn delete(identifier: string)
Delete the sessions
ArgumentTypeDescription
identifierstringThe name of the sessions
fn sync(identifier?: string)
Sync sessions state from GCP
ArgumentTypeDescription
identifier?stringTarget a specific sessions by name (e.g. one discovered by list)
fn list(activityType?: number, endTime?: string, includeDeleted?: boolean, startTime?: string, maxPages?: number)
List sessions resources
ArgumentTypeDescription
activityType?numberIf non-empty, only sessions with these activity types should be returned.
endTime?stringAn RFC3339 timestamp. Only sessions starting before endTime and ending after startTime up to (endTime + 1 day) will be included in the response. If this time is omitted but startTime is specified, all sessions ending after startTime to the end of time will be returned.
includeDeleted?booleanIf true, and if both startTime and endTime are omitted, session deletions will be returned.
startTime?stringAn RFC3339 timestamp. Only sessions starting before endTime and ending after startTime up to (endTime + 1 day) will be included in the response. If this time is omitted but endTime is specified, all sessions starting before endTime and ending after the start of time up to (endTime + 1 day) will be returned.
maxPages?numberMaximum number of pages to fetch (default: 10)

Resources

state(infinite)— Sessions contain metadata, such as a user-friendly name and time interval inf...
04Previous Versions19
2026.07.21.1
  • Updated: users_datasources, users_sessions
2026.07.20.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.07.19.2
  • Updated: users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.07.19.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.07.18.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.07.17.1
  • Updated: users_sessions
2026.06.08.2
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.06.07.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.05.25.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions

Modified 3 models

2026.05.24.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.05.21.2
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.05.21.1
2026.05.19.2
2026.05.19.1
2026.04.23.1
2026.04.04.1
  • Updated: users_datasources_datapointchanges, users_datasources_datasets
2026.04.03.3
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.04.03.1
  • Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
2026.04.02.2
05Stats
A
100 / 100
Downloads
0
Archive size
55.8 KB
Verified by Swamp
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels