Gcp/fitness
@swamp/gcp/fitnessv2026.07.21.3
01README
Google Cloud fitness infrastructure models
02Release Notes
- Updated: users_datasources, users_datasources_datapointchanges, users_datasources_datasets, users_sessions
03Models
@swamp/gcp/fitness/users-datasourcesv2026.07.21.3users_datasources.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| application? | object | Information about an application which feeds sensor data into the platform. |
| dataStreamId? | string | A 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? | string | The 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 | The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API. |
| device? | object | Representation of an integrated device (such as a phone or a wearable) that can hold sensors. |
| type | enum | A constant describing the type of this data source. Indicates whether this data source produces raw or derived data. |
| userId | string | Create 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
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the dataSources |
fn update(identifier?: string)
Update dataSources attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific dataSources by name (e.g. one discovered by list) |
fn delete(identifier: string)
Delete the dataSources
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the dataSources |
fn sync(identifier?: string)
Sync dataSources state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific dataSources by name (e.g. one discovered by list) |
fn list(dataTypeName?: string, maxPages?: number)
List dataSources resources
| Argument | Type | Description |
|---|---|---|
| dataTypeName? | string | The names of data types to include in the list. If not specified, all data sources will be returned. |
| maxPages? | number | Maximum 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
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| userId | string | List data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. |
| dataSourceId | string | The data stream ID of the data source that created the dataset. |
fn get(identifier: string)
Get a dataPointChanges
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the dataPointChanges |
fn sync(identifier?: string)
Sync dataPointChanges state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific dataPointChanges by name (e.g. one discovered by list) |
fn list(limit?: number, maxPages?: number)
List dataPointChanges resources
| Argument | Type | Description |
|---|---|---|
| limit? | number | If specified, no more than this many data point changes will be included in the response. |
| maxPages? | number | Maximum 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
| Argument | Type | Description |
|---|---|---|
| name | string | Instance name for this resource (used as the unique identifier in the factory pattern) |
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| dataSourceId? | string | The data stream ID of the data source that created the points in this dataset. |
| maxEndTimeNs? | string | The 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? | string | The 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? | string | This 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? | array | A 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. |
| userId | string | Retrieve 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
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the datasets |
fn update(identifier?: string)
Update datasets attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific datasets by name (e.g. one discovered by list) |
fn delete(identifier: string)
Delete the datasets
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the datasets |
fn sync(identifier?: string)
Sync datasets state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| accessToken? | string | GCP OAuth2 access token; overrides GCP_ACCESS_TOKEN environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| credentialsJson? | string | GCP service account JSON credentials; overrides GOOGLE_APPLICATION_CREDENTIALS_JSON environment variable. Wire with a vault.get(...) expression to source it from a vault. |
| project? | string | GCP project ID; overrides GCP_PROJECT / GOOGLE_CLOUD_PROJECT environment variables. |
| scopes? | string | Comma-separated OAuth scopes to request when minting access tokens via gcloud. Defaults to the API's Discovery Document scopes. |
| activeTimeMillis? | string | Session 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? | number | The type of activity this session represents. |
| application? | object | The application that created the session. |
| description? | string | A description for this session. |
| endTimeMillis? | string | An end time, in milliseconds since epoch, inclusive. |
| id? | string | A client-generated identifier that is unique across all sessions owned by this particular user. |
| modifiedTimeMillis? | string | A timestamp that indicates when the session was last modified. |
| name? | string | A human readable name of the session. |
| startTimeMillis? | string | A start time, in milliseconds since epoch, inclusive. |
| userId | string | Create 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
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the sessions |
fn update(identifier?: string)
Update sessions attributes
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target a specific sessions by name (e.g. one discovered by list) |
fn delete(identifier: string)
Delete the sessions
| Argument | Type | Description |
|---|---|---|
| identifier | string | The name of the sessions |
fn sync(identifier?: string)
Sync sessions state from GCP
| Argument | Type | Description |
|---|---|---|
| identifier? | string | Target 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
| Argument | Type | Description |
|---|---|---|
| activityType? | number | If non-empty, only sessions with these activity types should be returned. |
| endTime? | string | An 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? | boolean | If true, and if both startTime and endTime are omitted, session deletions will be returned. |
| startTime? | string | An 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? | number | Maximum number of pages to fetch (default: 10) |
Resources
state(infinite)— Sessions contain metadata, such as a user-friendly name and time interval inf...
04Previous Versions
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