@maxim_mazurok/gapi.client.fitness-v1 0.0.20220808
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +932 -0
- package/package.json +20 -0
- package/readme.md +131 -0
- package/tests.ts +318 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,932 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Fitness API v1 0.0 */
|
|
2
|
+
// Project: https://developers.google.com/fit/rest/v1/get-started
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
// TypeScript Version: 2.8
|
|
8
|
+
|
|
9
|
+
// IMPORTANT
|
|
10
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
|
+
// Generated from: https://fitness.googleapis.com/$discovery/rest?version=v1
|
|
13
|
+
// Revision: 20220808
|
|
14
|
+
|
|
15
|
+
/// <reference types="gapi.client" />
|
|
16
|
+
|
|
17
|
+
declare namespace gapi.client {
|
|
18
|
+
/** Load Fitness API v1 */
|
|
19
|
+
function load(urlOrObject: "https://fitness.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
|
|
20
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
21
|
+
function load(name: "fitness", version: "v1"): Promise<void>;
|
|
22
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
23
|
+
function load(name: "fitness", version: "v1", callback: () => any): void;
|
|
24
|
+
|
|
25
|
+
namespace fitness {
|
|
26
|
+
interface AggregateBucket {
|
|
27
|
+
/** Available for Bucket.Type.ACTIVITY_TYPE, Bucket.Type.ACTIVITY_SEGMENT */
|
|
28
|
+
activity?: number;
|
|
29
|
+
/** There will be one dataset per AggregateBy in the request. */
|
|
30
|
+
dataset?: Dataset[];
|
|
31
|
+
/** The end time for the aggregated data, in milliseconds since epoch, inclusive. */
|
|
32
|
+
endTimeMillis?: string;
|
|
33
|
+
/** Available for Bucket.Type.SESSION */
|
|
34
|
+
session?: Session;
|
|
35
|
+
/** The start time for the aggregated data, in milliseconds since epoch, inclusive. */
|
|
36
|
+
startTimeMillis?: string;
|
|
37
|
+
/** The type of a bucket signifies how the data aggregation is performed in the bucket. */
|
|
38
|
+
type?: string;
|
|
39
|
+
}
|
|
40
|
+
interface AggregateBy {
|
|
41
|
+
/**
|
|
42
|
+
* A data source ID to aggregate. Only data from the specified data source ID will be included in the aggregation. If specified, this data source must exist; the OAuth scopes in the
|
|
43
|
+
* supplied credentials must grant read access to this data type. The dataset in the response will have the same data source ID. Note: Data can be aggregated by either the dataTypeName
|
|
44
|
+
* or the dataSourceId, not both.
|
|
45
|
+
*/
|
|
46
|
+
dataSourceId?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The data type to aggregate. All data sources providing this data type will contribute data to the aggregation. The response will contain a single dataset for this data type name.
|
|
49
|
+
* The dataset will have a data source ID of derived::com.google.android.gms:aggregated. If the user has no data for this data type, an empty data set will be returned. Note: Data can
|
|
50
|
+
* be aggregated by either the dataTypeName or the dataSourceId, not both.
|
|
51
|
+
*/
|
|
52
|
+
dataTypeName?: string;
|
|
53
|
+
}
|
|
54
|
+
interface AggregateRequest {
|
|
55
|
+
/**
|
|
56
|
+
* The specification of data to be aggregated. At least one aggregateBy spec must be provided. All data that is specified will be aggregated using the same bucketing criteria. There
|
|
57
|
+
* will be one dataset in the response for every aggregateBy spec.
|
|
58
|
+
*/
|
|
59
|
+
aggregateBy?: AggregateBy[];
|
|
60
|
+
/**
|
|
61
|
+
* Specifies that data be aggregated each activity segment recorded for a user. Similar to bucketByActivitySegment, but bucketing is done for each activity segment rather than all
|
|
62
|
+
* segments of the same type. Mutually exclusive of other bucketing specifications.
|
|
63
|
+
*/
|
|
64
|
+
bucketByActivitySegment?: BucketByActivity;
|
|
65
|
+
/**
|
|
66
|
+
* Specifies that data be aggregated by the type of activity being performed when the data was recorded. All data that was recorded during a certain activity type (.for the given time
|
|
67
|
+
* range) will be aggregated into the same bucket. Data that was recorded while the user was not active will not be included in the response. Mutually exclusive of other bucketing
|
|
68
|
+
* specifications.
|
|
69
|
+
*/
|
|
70
|
+
bucketByActivityType?: BucketByActivity;
|
|
71
|
+
/**
|
|
72
|
+
* Specifies that data be aggregated by user sessions. Data that does not fall within the time range of a session will not be included in the response. Mutually exclusive of other
|
|
73
|
+
* bucketing specifications.
|
|
74
|
+
*/
|
|
75
|
+
bucketBySession?: BucketBySession;
|
|
76
|
+
/** Specifies that data be aggregated by a single time interval. Mutually exclusive of other bucketing specifications. */
|
|
77
|
+
bucketByTime?: BucketByTime;
|
|
78
|
+
/**
|
|
79
|
+
* The end of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. The maximum allowed difference
|
|
80
|
+
* between start_time_millis // and end_time_millis is 7776000000 (roughly 90 days).
|
|
81
|
+
*/
|
|
82
|
+
endTimeMillis?: string;
|
|
83
|
+
/** DO NOT POPULATE THIS FIELD. It is ignored. */
|
|
84
|
+
filteredDataQualityStandard?: string[];
|
|
85
|
+
/** The start of a window of time. Data that intersects with this time window will be aggregated. The time is in milliseconds since epoch, inclusive. */
|
|
86
|
+
startTimeMillis?: string;
|
|
87
|
+
}
|
|
88
|
+
interface AggregateResponse {
|
|
89
|
+
/** A list of buckets containing the aggregated data. */
|
|
90
|
+
bucket?: AggregateBucket[];
|
|
91
|
+
}
|
|
92
|
+
interface Application {
|
|
93
|
+
/** An optional URI that can be used to link back to the application. */
|
|
94
|
+
detailsUrl?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The name of this application. This is required for REST clients, but we do not enforce uniqueness of this name. It is provided as a matter of convenience for other developers who
|
|
97
|
+
* would like to identify which REST created an Application or Data Source.
|
|
98
|
+
*/
|
|
99
|
+
name?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Package name for this application. This is used as a unique identifier when created by Android applications, but cannot be specified by REST clients. REST clients will have their
|
|
102
|
+
* developer project number reflected into the Data Source data stream IDs, instead of the packageName.
|
|
103
|
+
*/
|
|
104
|
+
packageName?: string;
|
|
105
|
+
/** Version of the application. You should update this field whenever the application changes in a way that affects the computation of the data. */
|
|
106
|
+
version?: string;
|
|
107
|
+
}
|
|
108
|
+
interface BucketByActivity {
|
|
109
|
+
/** The default activity stream will be used if a specific activityDataSourceId is not specified. */
|
|
110
|
+
activityDataSourceId?: string;
|
|
111
|
+
/** Specifies that only activity segments of duration longer than minDurationMillis are considered and used as a container for aggregated data. */
|
|
112
|
+
minDurationMillis?: string;
|
|
113
|
+
}
|
|
114
|
+
interface BucketBySession {
|
|
115
|
+
/** Specifies that only sessions of duration longer than minDurationMillis are considered and used as a container for aggregated data. */
|
|
116
|
+
minDurationMillis?: string;
|
|
117
|
+
}
|
|
118
|
+
interface BucketByTime {
|
|
119
|
+
/** Specifies that result buckets aggregate data by exactly durationMillis time frames. Time frames that contain no data will be included in the response with an empty dataset. */
|
|
120
|
+
durationMillis?: string;
|
|
121
|
+
period?: BucketByTimePeriod;
|
|
122
|
+
}
|
|
123
|
+
interface BucketByTimePeriod {
|
|
124
|
+
/** org.joda.timezone.DateTimeZone */
|
|
125
|
+
timeZoneId?: string;
|
|
126
|
+
type?: string;
|
|
127
|
+
value?: number;
|
|
128
|
+
}
|
|
129
|
+
interface DataPoint {
|
|
130
|
+
/** DO NOT USE THIS FIELD. It is ignored, and not stored. */
|
|
131
|
+
computationTimeMillis?: string;
|
|
132
|
+
/** The data type defining the format of the values in this data point. */
|
|
133
|
+
dataTypeName?: string;
|
|
134
|
+
/** The end time of the interval represented by this data point, in nanoseconds since epoch. */
|
|
135
|
+
endTimeNanos?: string;
|
|
136
|
+
/** Indicates the last time this data point was modified. Useful only in contexts where we are listing the data changes, rather than representing the current state of the data. */
|
|
137
|
+
modifiedTimeMillis?: string;
|
|
138
|
+
/**
|
|
139
|
+
* If the data point is contained in a dataset for a derived data source, this field will be populated with the data source stream ID that created the data point originally. WARNING:
|
|
140
|
+
* do not rely on this field for anything other than debugging. The value of this field, if it is set at all, is an implementation detail and is not guaranteed to remain consistent.
|
|
141
|
+
*/
|
|
142
|
+
originDataSourceId?: string;
|
|
143
|
+
/** The raw timestamp from the original SensorEvent. */
|
|
144
|
+
rawTimestampNanos?: string;
|
|
145
|
+
/** The start time of the interval represented by this data point, in nanoseconds since epoch. */
|
|
146
|
+
startTimeNanos?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Values of each data type field for the data point. It is expected that each value corresponding to a data type field will occur in the same order that the field is listed with in
|
|
149
|
+
* the data type specified in a data source. Only one of integer and floating point fields will be populated, depending on the format enum value within data source's type field.
|
|
150
|
+
*/
|
|
151
|
+
value?: Value[];
|
|
152
|
+
}
|
|
153
|
+
interface Dataset {
|
|
154
|
+
/** The data stream ID of the data source that created the points in this dataset. */
|
|
155
|
+
dataSourceId?: string;
|
|
156
|
+
/**
|
|
157
|
+
* 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
|
|
158
|
+
* dataset identifier.
|
|
159
|
+
*/
|
|
160
|
+
maxEndTimeNs?: string;
|
|
161
|
+
/**
|
|
162
|
+
* 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
|
|
163
|
+
* dataset identifier.
|
|
164
|
+
*/
|
|
165
|
+
minStartTimeNs?: string;
|
|
166
|
+
/**
|
|
167
|
+
* 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
|
|
168
|
+
* GET request to return the next page of data points within this dataset.
|
|
169
|
+
*/
|
|
170
|
+
nextPageToken?: string;
|
|
171
|
+
/**
|
|
172
|
+
* 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
|
|
173
|
+
* or retrieving a dataset that is too large to include in a single response.
|
|
174
|
+
*/
|
|
175
|
+
point?: DataPoint[];
|
|
176
|
+
}
|
|
177
|
+
interface DataSource {
|
|
178
|
+
/** Information about an application which feeds sensor data into the platform. */
|
|
179
|
+
application?: Application;
|
|
180
|
+
/** DO NOT POPULATE THIS FIELD. It is never populated in responses from the platform, and is ignored in queries. It will be removed in a future version entirely. */
|
|
181
|
+
dataQualityStandard?: string[];
|
|
182
|
+
/**
|
|
183
|
+
* 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
|
|
184
|
+
* 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
|
|
185
|
+
* 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 of the stream identifier. In
|
|
186
|
+
* particular, the version of the hardware/the application isn't used. This allows us to preserve the same stream through version updates. This also means that two DataSource objects
|
|
187
|
+
* may represent the same data stream even if they're not equal. The exact format of the data stream ID created by an Android application is:
|
|
188
|
+
* type:dataType.name:application.packageName:device.manufacturer:device.model:device.uid:dataStreamName The exact format of the data stream ID created by a REST client is:
|
|
189
|
+
* type:dataType.name:developer project number:device.manufacturer:device.model:device.uid:dataStreamName When any of the optional fields that make up the data stream ID are absent,
|
|
190
|
+
* they will be omitted from the data stream ID. The minimum viable data stream ID would be: type:dataType.name:developer project number Finally, the developer project number and
|
|
191
|
+
* device UID are obfuscated when read by any REST or Android client that did not create the data source. Only the data source creator will see the developer project number in clear
|
|
192
|
+
* and normal form. This means a client will see a different set of data_stream_ids than another client with different credentials.
|
|
193
|
+
*/
|
|
194
|
+
dataStreamId?: string;
|
|
195
|
+
/**
|
|
196
|
+
* 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
|
|
197
|
+
* should be done whenever an application exposes two streams for the same data type, or when a device has two equivalent sensors.
|
|
198
|
+
*/
|
|
199
|
+
dataStreamName?: string;
|
|
200
|
+
/** The data type defines the schema for a stream of data being collected by, inserted into, or queried from the Fitness API. */
|
|
201
|
+
dataType?: DataType;
|
|
202
|
+
/** Representation of an integrated device (such as a phone or a wearable) that can hold sensors. */
|
|
203
|
+
device?: Device;
|
|
204
|
+
/** An end-user visible name for this data source. */
|
|
205
|
+
name?: string;
|
|
206
|
+
/** A constant describing the type of this data source. Indicates whether this data source produces raw or derived data. */
|
|
207
|
+
type?: string;
|
|
208
|
+
}
|
|
209
|
+
interface DataType {
|
|
210
|
+
/** A field represents one dimension of a data type. */
|
|
211
|
+
field?: DataTypeField[];
|
|
212
|
+
/** Each data type has a unique, namespaced, name. All data types in the com.google namespace are shared as part of the platform. */
|
|
213
|
+
name?: string;
|
|
214
|
+
}
|
|
215
|
+
interface DataTypeField {
|
|
216
|
+
/** The different supported formats for each field in a data type. */
|
|
217
|
+
format?: string;
|
|
218
|
+
/** Defines the name and format of data. Unlike data type names, field names are not namespaced, and only need to be unique within the data type. */
|
|
219
|
+
name?: string;
|
|
220
|
+
optional?: boolean;
|
|
221
|
+
}
|
|
222
|
+
interface Device {
|
|
223
|
+
/** Manufacturer of the product/hardware. */
|
|
224
|
+
manufacturer?: string;
|
|
225
|
+
/** End-user visible model name for the device. */
|
|
226
|
+
model?: string;
|
|
227
|
+
/** A constant representing the type of the device. */
|
|
228
|
+
type?: string;
|
|
229
|
+
/**
|
|
230
|
+
* The serial number or other unique ID for the hardware. This field is obfuscated when read by any REST or Android client that did not create the data source. Only the data source
|
|
231
|
+
* creator will see the uid field in clear and normal form. The obfuscation preserves equality; that is, given two IDs, if id1 == id2, obfuscated(id1) == obfuscated(id2).
|
|
232
|
+
*/
|
|
233
|
+
uid?: string;
|
|
234
|
+
/** Version string for the device hardware/software. */
|
|
235
|
+
version?: string;
|
|
236
|
+
}
|
|
237
|
+
interface ListDataPointChangesResponse {
|
|
238
|
+
/** The data stream ID of the data source with data point changes. */
|
|
239
|
+
dataSourceId?: string;
|
|
240
|
+
/** Deleted data points for the user. Note, for modifications this should be parsed before handling insertions. */
|
|
241
|
+
deletedDataPoint?: DataPoint[];
|
|
242
|
+
/** Inserted data points for the user. */
|
|
243
|
+
insertedDataPoint?: DataPoint[];
|
|
244
|
+
/** The continuation token, which is used to page through large result sets. Provide this value in a subsequent request to return the next page of results. */
|
|
245
|
+
nextPageToken?: string;
|
|
246
|
+
}
|
|
247
|
+
interface ListDataSourcesResponse {
|
|
248
|
+
/** A previously created data source. */
|
|
249
|
+
dataSource?: DataSource[];
|
|
250
|
+
}
|
|
251
|
+
interface ListSessionsResponse {
|
|
252
|
+
/** If includeDeleted is set to true in the request, and startTime and endTime are omitted, this will include sessions which were deleted since the last sync. */
|
|
253
|
+
deletedSession?: Session[];
|
|
254
|
+
/** Flag to indicate server has more data to transfer. DO NOT USE THIS FIELD. It is never populated in responses from the server. */
|
|
255
|
+
hasMoreData?: boolean;
|
|
256
|
+
/** The sync token which is used to sync further changes. This will only be provided if both startTime and endTime are omitted from the request. */
|
|
257
|
+
nextPageToken?: string;
|
|
258
|
+
/** Sessions with an end time that is between startTime and endTime of the request. */
|
|
259
|
+
session?: Session[];
|
|
260
|
+
}
|
|
261
|
+
interface MapValue {
|
|
262
|
+
/** Floating point value. */
|
|
263
|
+
fpVal?: number;
|
|
264
|
+
}
|
|
265
|
+
interface Session {
|
|
266
|
+
/**
|
|
267
|
+
* 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
|
|
268
|
+
* time during the session is known, it should also be inserted via a com.google.activity.segment data point with a STILL activity value
|
|
269
|
+
*/
|
|
270
|
+
activeTimeMillis?: string;
|
|
271
|
+
/** The type of activity this session represents. */
|
|
272
|
+
activityType?: number;
|
|
273
|
+
/** The application that created the session. */
|
|
274
|
+
application?: Application;
|
|
275
|
+
/** A description for this session. */
|
|
276
|
+
description?: string;
|
|
277
|
+
/** An end time, in milliseconds since epoch, inclusive. */
|
|
278
|
+
endTimeMillis?: string;
|
|
279
|
+
/** A client-generated identifier that is unique across all sessions owned by this particular user. */
|
|
280
|
+
id?: string;
|
|
281
|
+
/** A timestamp that indicates when the session was last modified. */
|
|
282
|
+
modifiedTimeMillis?: string;
|
|
283
|
+
/** A human readable name of the session. */
|
|
284
|
+
name?: string;
|
|
285
|
+
/** A start time, in milliseconds since epoch, inclusive. */
|
|
286
|
+
startTimeMillis?: string;
|
|
287
|
+
}
|
|
288
|
+
interface Value {
|
|
289
|
+
/** Floating point value. When this is set, other values must not be set. */
|
|
290
|
+
fpVal?: number;
|
|
291
|
+
/** Integer value. When this is set, other values must not be set. */
|
|
292
|
+
intVal?: number;
|
|
293
|
+
/**
|
|
294
|
+
* Map value. The valid key space and units for the corresponding value of each entry should be documented as part of the data type definition. Keys should be kept small whenever
|
|
295
|
+
* possible. Data streams with large keys and high data frequency may be down sampled.
|
|
296
|
+
*/
|
|
297
|
+
mapVal?: ValueMapValEntry[];
|
|
298
|
+
/**
|
|
299
|
+
* String value. When this is set, other values must not be set. Strings should be kept small whenever possible. Data streams with large string values and high data frequency may be
|
|
300
|
+
* down sampled.
|
|
301
|
+
*/
|
|
302
|
+
stringVal?: string;
|
|
303
|
+
}
|
|
304
|
+
interface ValueMapValEntry {
|
|
305
|
+
key?: string;
|
|
306
|
+
value?: MapValue;
|
|
307
|
+
}
|
|
308
|
+
interface DatasetResource {
|
|
309
|
+
/**
|
|
310
|
+
* Aggregates data of a certain type or stream into buckets divided by a given type of boundary. Multiple data sets of multiple types and from multiple sources can be aggregated into
|
|
311
|
+
* exactly one bucket type per request.
|
|
312
|
+
*/
|
|
313
|
+
aggregate(request: {
|
|
314
|
+
/** V1 error format. */
|
|
315
|
+
"$.xgafv"?: string;
|
|
316
|
+
/** OAuth access token. */
|
|
317
|
+
access_token?: string;
|
|
318
|
+
/** Data format for response. */
|
|
319
|
+
alt?: string;
|
|
320
|
+
/** JSONP */
|
|
321
|
+
callback?: string;
|
|
322
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
323
|
+
fields?: string;
|
|
324
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
325
|
+
key?: string;
|
|
326
|
+
/** OAuth 2.0 token for the current user. */
|
|
327
|
+
oauth_token?: string;
|
|
328
|
+
/** Returns response with indentations and line breaks. */
|
|
329
|
+
prettyPrint?: boolean;
|
|
330
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
331
|
+
quotaUser?: string;
|
|
332
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
333
|
+
upload_protocol?: string;
|
|
334
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
335
|
+
uploadType?: string;
|
|
336
|
+
/** Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
337
|
+
userId: string;
|
|
338
|
+
/** Request body */
|
|
339
|
+
resource: AggregateRequest;
|
|
340
|
+
}): Request<AggregateResponse>;
|
|
341
|
+
aggregate(request: {
|
|
342
|
+
/** V1 error format. */
|
|
343
|
+
"$.xgafv"?: string;
|
|
344
|
+
/** OAuth access token. */
|
|
345
|
+
access_token?: string;
|
|
346
|
+
/** Data format for response. */
|
|
347
|
+
alt?: string;
|
|
348
|
+
/** JSONP */
|
|
349
|
+
callback?: string;
|
|
350
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
351
|
+
fields?: string;
|
|
352
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
353
|
+
key?: string;
|
|
354
|
+
/** OAuth 2.0 token for the current user. */
|
|
355
|
+
oauth_token?: string;
|
|
356
|
+
/** Returns response with indentations and line breaks. */
|
|
357
|
+
prettyPrint?: boolean;
|
|
358
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
359
|
+
quotaUser?: string;
|
|
360
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
361
|
+
upload_protocol?: string;
|
|
362
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
363
|
+
uploadType?: string;
|
|
364
|
+
/** Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
365
|
+
userId: string;
|
|
366
|
+
},
|
|
367
|
+
body: AggregateRequest): Request<AggregateResponse>;
|
|
368
|
+
}
|
|
369
|
+
interface DataPointChangesResource {
|
|
370
|
+
/** Queries for user's data point changes for a particular data source. */
|
|
371
|
+
list(request?: {
|
|
372
|
+
/** V1 error format. */
|
|
373
|
+
"$.xgafv"?: string;
|
|
374
|
+
/** OAuth access token. */
|
|
375
|
+
access_token?: string;
|
|
376
|
+
/** Data format for response. */
|
|
377
|
+
alt?: string;
|
|
378
|
+
/** JSONP */
|
|
379
|
+
callback?: string;
|
|
380
|
+
/** The data stream ID of the data source that created the dataset. */
|
|
381
|
+
dataSourceId: string;
|
|
382
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
383
|
+
fields?: string;
|
|
384
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
385
|
+
key?: string;
|
|
386
|
+
/** If specified, no more than this many data point changes will be included in the response. */
|
|
387
|
+
limit?: number;
|
|
388
|
+
/** OAuth 2.0 token for the current user. */
|
|
389
|
+
oauth_token?: string;
|
|
390
|
+
/**
|
|
391
|
+
* The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of nextPageToken from the previous
|
|
392
|
+
* response.
|
|
393
|
+
*/
|
|
394
|
+
pageToken?: string;
|
|
395
|
+
/** Returns response with indentations and line breaks. */
|
|
396
|
+
prettyPrint?: boolean;
|
|
397
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
398
|
+
quotaUser?: string;
|
|
399
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
400
|
+
upload_protocol?: string;
|
|
401
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
402
|
+
uploadType?: string;
|
|
403
|
+
/** List data points for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
404
|
+
userId: string;
|
|
405
|
+
}): Request<ListDataPointChangesResponse>;
|
|
406
|
+
}
|
|
407
|
+
interface DatasetsResource {
|
|
408
|
+
/**
|
|
409
|
+
* Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data
|
|
410
|
+
* point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the
|
|
411
|
+
* dataset, only the overlapping portion of the data point will be deleted.
|
|
412
|
+
*/
|
|
413
|
+
delete(request?: {
|
|
414
|
+
/** V1 error format. */
|
|
415
|
+
"$.xgafv"?: string;
|
|
416
|
+
/** OAuth access token. */
|
|
417
|
+
access_token?: string;
|
|
418
|
+
/** Data format for response. */
|
|
419
|
+
alt?: string;
|
|
420
|
+
/** JSONP */
|
|
421
|
+
callback?: string;
|
|
422
|
+
/**
|
|
423
|
+
* Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like:
|
|
424
|
+
* "startTime-endTime" where startTime and endTime are 64 bit integers.
|
|
425
|
+
*/
|
|
426
|
+
datasetId: string;
|
|
427
|
+
/** The data stream ID of the data source that created the dataset. */
|
|
428
|
+
dataSourceId: string;
|
|
429
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
430
|
+
fields?: string;
|
|
431
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
432
|
+
key?: string;
|
|
433
|
+
/** OAuth 2.0 token for the current user. */
|
|
434
|
+
oauth_token?: string;
|
|
435
|
+
/** Returns response with indentations and line breaks. */
|
|
436
|
+
prettyPrint?: boolean;
|
|
437
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
438
|
+
quotaUser?: string;
|
|
439
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
440
|
+
upload_protocol?: string;
|
|
441
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
442
|
+
uploadType?: string;
|
|
443
|
+
/** Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
444
|
+
userId: string;
|
|
445
|
+
}): Request<void>;
|
|
446
|
+
/**
|
|
447
|
+
* Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any
|
|
448
|
+
* data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.
|
|
449
|
+
*/
|
|
450
|
+
get(request?: {
|
|
451
|
+
/** V1 error format. */
|
|
452
|
+
"$.xgafv"?: string;
|
|
453
|
+
/** OAuth access token. */
|
|
454
|
+
access_token?: string;
|
|
455
|
+
/** Data format for response. */
|
|
456
|
+
alt?: string;
|
|
457
|
+
/** JSONP */
|
|
458
|
+
callback?: string;
|
|
459
|
+
/**
|
|
460
|
+
* Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like:
|
|
461
|
+
* "startTime-endTime" where startTime and endTime are 64 bit integers.
|
|
462
|
+
*/
|
|
463
|
+
datasetId: string;
|
|
464
|
+
/** The data stream ID of the data source that created the dataset. */
|
|
465
|
+
dataSourceId: string;
|
|
466
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
467
|
+
fields?: string;
|
|
468
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
469
|
+
key?: string;
|
|
470
|
+
/**
|
|
471
|
+
* If specified, no more than this many data points will be included in the dataset. If there are more data points in the dataset, nextPageToken will be set in the dataset
|
|
472
|
+
* response. The limit is applied from the end of the time range. That is, if pageToken is absent, the limit most recent data points will be returned.
|
|
473
|
+
*/
|
|
474
|
+
limit?: number;
|
|
475
|
+
/** OAuth 2.0 token for the current user. */
|
|
476
|
+
oauth_token?: string;
|
|
477
|
+
/**
|
|
478
|
+
* The continuation token, which is used to page through large datasets. To get the next page of a dataset, set this parameter to the value of nextPageToken from the previous
|
|
479
|
+
* response. Each subsequent call will yield a partial dataset with data point end timestamps that are strictly smaller than those in the previous partial response.
|
|
480
|
+
*/
|
|
481
|
+
pageToken?: string;
|
|
482
|
+
/** Returns response with indentations and line breaks. */
|
|
483
|
+
prettyPrint?: boolean;
|
|
484
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
485
|
+
quotaUser?: string;
|
|
486
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
487
|
+
upload_protocol?: string;
|
|
488
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
489
|
+
uploadType?: string;
|
|
490
|
+
/** Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
491
|
+
userId: string;
|
|
492
|
+
}): Request<Dataset>;
|
|
493
|
+
/**
|
|
494
|
+
* Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data
|
|
495
|
+
* points can belong to more than one dataset. This method does not use patch semantics: the data points provided are merely inserted, with no existing data replaced.
|
|
496
|
+
*/
|
|
497
|
+
patch(request: {
|
|
498
|
+
/** V1 error format. */
|
|
499
|
+
"$.xgafv"?: string;
|
|
500
|
+
/** OAuth access token. */
|
|
501
|
+
access_token?: string;
|
|
502
|
+
/** Data format for response. */
|
|
503
|
+
alt?: string;
|
|
504
|
+
/** JSONP */
|
|
505
|
+
callback?: string;
|
|
506
|
+
/** This field is not used, and can be safely omitted. */
|
|
507
|
+
datasetId: string;
|
|
508
|
+
/** The data stream ID of the data source that created the dataset. */
|
|
509
|
+
dataSourceId: string;
|
|
510
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
511
|
+
fields?: string;
|
|
512
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
513
|
+
key?: string;
|
|
514
|
+
/** OAuth 2.0 token for the current user. */
|
|
515
|
+
oauth_token?: string;
|
|
516
|
+
/** Returns response with indentations and line breaks. */
|
|
517
|
+
prettyPrint?: boolean;
|
|
518
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
519
|
+
quotaUser?: string;
|
|
520
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
521
|
+
upload_protocol?: string;
|
|
522
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
523
|
+
uploadType?: string;
|
|
524
|
+
/** Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
525
|
+
userId: string;
|
|
526
|
+
/** Request body */
|
|
527
|
+
resource: Dataset;
|
|
528
|
+
}): Request<Dataset>;
|
|
529
|
+
patch(request: {
|
|
530
|
+
/** V1 error format. */
|
|
531
|
+
"$.xgafv"?: string;
|
|
532
|
+
/** OAuth access token. */
|
|
533
|
+
access_token?: string;
|
|
534
|
+
/** Data format for response. */
|
|
535
|
+
alt?: string;
|
|
536
|
+
/** JSONP */
|
|
537
|
+
callback?: string;
|
|
538
|
+
/** This field is not used, and can be safely omitted. */
|
|
539
|
+
datasetId: string;
|
|
540
|
+
/** The data stream ID of the data source that created the dataset. */
|
|
541
|
+
dataSourceId: string;
|
|
542
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
543
|
+
fields?: string;
|
|
544
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
545
|
+
key?: string;
|
|
546
|
+
/** OAuth 2.0 token for the current user. */
|
|
547
|
+
oauth_token?: string;
|
|
548
|
+
/** Returns response with indentations and line breaks. */
|
|
549
|
+
prettyPrint?: boolean;
|
|
550
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
551
|
+
quotaUser?: string;
|
|
552
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
553
|
+
upload_protocol?: string;
|
|
554
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
555
|
+
uploadType?: string;
|
|
556
|
+
/** Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
557
|
+
userId: string;
|
|
558
|
+
},
|
|
559
|
+
body: Dataset): Request<Dataset>;
|
|
560
|
+
}
|
|
561
|
+
interface DataSourcesResource {
|
|
562
|
+
/**
|
|
563
|
+
* Creates a new data source that is unique across all data sources belonging to this user. A data source is a unique source of sensor data. Data sources can expose raw data coming
|
|
564
|
+
* from hardware sensors on local or companion devices. They can also expose derived data, created by transforming or merging other data sources. Multiple data sources can exist for
|
|
565
|
+
* the same data type. Every data point in every dataset inserted into or read from the Fitness API has an associated data source. Each data source produces a unique stream of dataset
|
|
566
|
+
* updates, with a unique data source identifier. Not all changes to data source affect the data stream ID, so that data collected by updated versions of the same application/device
|
|
567
|
+
* can still be considered to belong to the same data source. Data sources are identified using a string generated by the server, based on the contents of the source being created. The
|
|
568
|
+
* dataStreamId field should not be set when invoking this method. It will be automatically generated by the server with the correct format. If a dataStreamId is set, it must match the
|
|
569
|
+
* format that the server would generate. This format is a combination of some fields from the data source, and has a specific order. If it doesn't match, the request will fail with an
|
|
570
|
+
* error. Specifying a DataType which is not a known type (beginning with "com.google.") will create a DataSource with a *custom data type*. Custom data types are only readable by the
|
|
571
|
+
* application that created them. Custom data types are *deprecated*; use standard data types instead. In addition to the data source fields included in the data source ID, the
|
|
572
|
+
* developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public
|
|
573
|
+
* data types.
|
|
574
|
+
*/
|
|
575
|
+
create(request: {
|
|
576
|
+
/** V1 error format. */
|
|
577
|
+
"$.xgafv"?: string;
|
|
578
|
+
/** OAuth access token. */
|
|
579
|
+
access_token?: string;
|
|
580
|
+
/** Data format for response. */
|
|
581
|
+
alt?: string;
|
|
582
|
+
/** JSONP */
|
|
583
|
+
callback?: string;
|
|
584
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
585
|
+
fields?: string;
|
|
586
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
587
|
+
key?: string;
|
|
588
|
+
/** OAuth 2.0 token for the current user. */
|
|
589
|
+
oauth_token?: string;
|
|
590
|
+
/** Returns response with indentations and line breaks. */
|
|
591
|
+
prettyPrint?: boolean;
|
|
592
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
593
|
+
quotaUser?: string;
|
|
594
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
595
|
+
upload_protocol?: string;
|
|
596
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
597
|
+
uploadType?: string;
|
|
598
|
+
/** Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
599
|
+
userId: string;
|
|
600
|
+
/** Request body */
|
|
601
|
+
resource: DataSource;
|
|
602
|
+
}): Request<DataSource>;
|
|
603
|
+
create(request: {
|
|
604
|
+
/** V1 error format. */
|
|
605
|
+
"$.xgafv"?: string;
|
|
606
|
+
/** OAuth access token. */
|
|
607
|
+
access_token?: string;
|
|
608
|
+
/** Data format for response. */
|
|
609
|
+
alt?: string;
|
|
610
|
+
/** JSONP */
|
|
611
|
+
callback?: string;
|
|
612
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
613
|
+
fields?: string;
|
|
614
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
615
|
+
key?: string;
|
|
616
|
+
/** OAuth 2.0 token for the current user. */
|
|
617
|
+
oauth_token?: string;
|
|
618
|
+
/** Returns response with indentations and line breaks. */
|
|
619
|
+
prettyPrint?: boolean;
|
|
620
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
621
|
+
quotaUser?: string;
|
|
622
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
623
|
+
upload_protocol?: string;
|
|
624
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
625
|
+
uploadType?: string;
|
|
626
|
+
/** Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
627
|
+
userId: string;
|
|
628
|
+
},
|
|
629
|
+
body: DataSource): Request<DataSource>;
|
|
630
|
+
/** Deletes the specified data source. The request will fail if the data source contains any data points. */
|
|
631
|
+
delete(request?: {
|
|
632
|
+
/** V1 error format. */
|
|
633
|
+
"$.xgafv"?: string;
|
|
634
|
+
/** OAuth access token. */
|
|
635
|
+
access_token?: string;
|
|
636
|
+
/** Data format for response. */
|
|
637
|
+
alt?: string;
|
|
638
|
+
/** JSONP */
|
|
639
|
+
callback?: string;
|
|
640
|
+
/** The data stream ID of the data source to delete. */
|
|
641
|
+
dataSourceId: string;
|
|
642
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
643
|
+
fields?: string;
|
|
644
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
645
|
+
key?: string;
|
|
646
|
+
/** OAuth 2.0 token for the current user. */
|
|
647
|
+
oauth_token?: string;
|
|
648
|
+
/** Returns response with indentations and line breaks. */
|
|
649
|
+
prettyPrint?: boolean;
|
|
650
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
651
|
+
quotaUser?: string;
|
|
652
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
653
|
+
upload_protocol?: string;
|
|
654
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
655
|
+
uploadType?: string;
|
|
656
|
+
/** Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
657
|
+
userId: string;
|
|
658
|
+
}): Request<DataSource>;
|
|
659
|
+
/** Returns the specified data source. */
|
|
660
|
+
get(request?: {
|
|
661
|
+
/** V1 error format. */
|
|
662
|
+
"$.xgafv"?: string;
|
|
663
|
+
/** OAuth access token. */
|
|
664
|
+
access_token?: string;
|
|
665
|
+
/** Data format for response. */
|
|
666
|
+
alt?: string;
|
|
667
|
+
/** JSONP */
|
|
668
|
+
callback?: string;
|
|
669
|
+
/** The data stream ID of the data source to retrieve. */
|
|
670
|
+
dataSourceId: string;
|
|
671
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
672
|
+
fields?: string;
|
|
673
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
674
|
+
key?: string;
|
|
675
|
+
/** OAuth 2.0 token for the current user. */
|
|
676
|
+
oauth_token?: string;
|
|
677
|
+
/** Returns response with indentations and line breaks. */
|
|
678
|
+
prettyPrint?: boolean;
|
|
679
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
680
|
+
quotaUser?: string;
|
|
681
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
682
|
+
upload_protocol?: string;
|
|
683
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
684
|
+
uploadType?: string;
|
|
685
|
+
/** Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
686
|
+
userId: string;
|
|
687
|
+
}): Request<DataSource>;
|
|
688
|
+
/**
|
|
689
|
+
* Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible
|
|
690
|
+
* to other developers, or calls using other scopes.
|
|
691
|
+
*/
|
|
692
|
+
list(request?: {
|
|
693
|
+
/** V1 error format. */
|
|
694
|
+
"$.xgafv"?: string;
|
|
695
|
+
/** OAuth access token. */
|
|
696
|
+
access_token?: string;
|
|
697
|
+
/** Data format for response. */
|
|
698
|
+
alt?: string;
|
|
699
|
+
/** JSONP */
|
|
700
|
+
callback?: string;
|
|
701
|
+
/** The names of data types to include in the list. If not specified, all data sources will be returned. */
|
|
702
|
+
dataTypeName?: string | string[];
|
|
703
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
704
|
+
fields?: string;
|
|
705
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
706
|
+
key?: string;
|
|
707
|
+
/** OAuth 2.0 token for the current user. */
|
|
708
|
+
oauth_token?: string;
|
|
709
|
+
/** Returns response with indentations and line breaks. */
|
|
710
|
+
prettyPrint?: boolean;
|
|
711
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
712
|
+
quotaUser?: string;
|
|
713
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
714
|
+
upload_protocol?: string;
|
|
715
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
716
|
+
uploadType?: string;
|
|
717
|
+
/** List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
718
|
+
userId: string;
|
|
719
|
+
}): Request<ListDataSourcesResponse>;
|
|
720
|
+
/**
|
|
721
|
+
* Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are
|
|
722
|
+
* identified by their dataStreamId.
|
|
723
|
+
*/
|
|
724
|
+
update(request: {
|
|
725
|
+
/** V1 error format. */
|
|
726
|
+
"$.xgafv"?: string;
|
|
727
|
+
/** OAuth access token. */
|
|
728
|
+
access_token?: string;
|
|
729
|
+
/** Data format for response. */
|
|
730
|
+
alt?: string;
|
|
731
|
+
/** JSONP */
|
|
732
|
+
callback?: string;
|
|
733
|
+
/** The data stream ID of the data source to update. */
|
|
734
|
+
dataSourceId: string;
|
|
735
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
736
|
+
fields?: string;
|
|
737
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
738
|
+
key?: string;
|
|
739
|
+
/** OAuth 2.0 token for the current user. */
|
|
740
|
+
oauth_token?: string;
|
|
741
|
+
/** Returns response with indentations and line breaks. */
|
|
742
|
+
prettyPrint?: boolean;
|
|
743
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
744
|
+
quotaUser?: string;
|
|
745
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
746
|
+
upload_protocol?: string;
|
|
747
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
748
|
+
uploadType?: string;
|
|
749
|
+
/** Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
750
|
+
userId: string;
|
|
751
|
+
/** Request body */
|
|
752
|
+
resource: DataSource;
|
|
753
|
+
}): Request<DataSource>;
|
|
754
|
+
update(request: {
|
|
755
|
+
/** V1 error format. */
|
|
756
|
+
"$.xgafv"?: string;
|
|
757
|
+
/** OAuth access token. */
|
|
758
|
+
access_token?: string;
|
|
759
|
+
/** Data format for response. */
|
|
760
|
+
alt?: string;
|
|
761
|
+
/** JSONP */
|
|
762
|
+
callback?: string;
|
|
763
|
+
/** The data stream ID of the data source to update. */
|
|
764
|
+
dataSourceId: string;
|
|
765
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
766
|
+
fields?: string;
|
|
767
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
768
|
+
key?: string;
|
|
769
|
+
/** OAuth 2.0 token for the current user. */
|
|
770
|
+
oauth_token?: string;
|
|
771
|
+
/** Returns response with indentations and line breaks. */
|
|
772
|
+
prettyPrint?: boolean;
|
|
773
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
774
|
+
quotaUser?: string;
|
|
775
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
776
|
+
upload_protocol?: string;
|
|
777
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
778
|
+
uploadType?: string;
|
|
779
|
+
/** Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
780
|
+
userId: string;
|
|
781
|
+
},
|
|
782
|
+
body: DataSource): Request<DataSource>;
|
|
783
|
+
dataPointChanges: DataPointChangesResource;
|
|
784
|
+
datasets: DatasetsResource;
|
|
785
|
+
}
|
|
786
|
+
interface SessionsResource {
|
|
787
|
+
/** Deletes a session specified by the given session ID. */
|
|
788
|
+
delete(request?: {
|
|
789
|
+
/** V1 error format. */
|
|
790
|
+
"$.xgafv"?: string;
|
|
791
|
+
/** OAuth access token. */
|
|
792
|
+
access_token?: string;
|
|
793
|
+
/** Data format for response. */
|
|
794
|
+
alt?: string;
|
|
795
|
+
/** JSONP */
|
|
796
|
+
callback?: string;
|
|
797
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
798
|
+
fields?: string;
|
|
799
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
800
|
+
key?: string;
|
|
801
|
+
/** OAuth 2.0 token for the current user. */
|
|
802
|
+
oauth_token?: string;
|
|
803
|
+
/** Returns response with indentations and line breaks. */
|
|
804
|
+
prettyPrint?: boolean;
|
|
805
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
806
|
+
quotaUser?: string;
|
|
807
|
+
/** The ID of the session to be deleted. */
|
|
808
|
+
sessionId: string;
|
|
809
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
810
|
+
upload_protocol?: string;
|
|
811
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
812
|
+
uploadType?: string;
|
|
813
|
+
/** Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
814
|
+
userId: string;
|
|
815
|
+
}): Request<void>;
|
|
816
|
+
/** Lists sessions previously created. */
|
|
817
|
+
list(request?: {
|
|
818
|
+
/** V1 error format. */
|
|
819
|
+
"$.xgafv"?: string;
|
|
820
|
+
/** OAuth access token. */
|
|
821
|
+
access_token?: string;
|
|
822
|
+
/** If non-empty, only sessions with these activity types should be returned. */
|
|
823
|
+
activityType?: number | number[];
|
|
824
|
+
/** Data format for response. */
|
|
825
|
+
alt?: string;
|
|
826
|
+
/** JSONP */
|
|
827
|
+
callback?: string;
|
|
828
|
+
/**
|
|
829
|
+
* An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. If this time is omitted but startTime is specified, all sessions
|
|
830
|
+
* from startTime to the end of time will be returned.
|
|
831
|
+
*/
|
|
832
|
+
endTime?: string;
|
|
833
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
834
|
+
fields?: string;
|
|
835
|
+
/** If true, and if both startTime and endTime are omitted, session deletions will be returned. */
|
|
836
|
+
includeDeleted?: boolean;
|
|
837
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
838
|
+
key?: string;
|
|
839
|
+
/** OAuth 2.0 token for the current user. */
|
|
840
|
+
oauth_token?: string;
|
|
841
|
+
/**
|
|
842
|
+
* The continuation token, which is used for incremental syncing. To get the next batch of changes, set this parameter to the value of nextPageToken from the previous response. The
|
|
843
|
+
* page token is ignored if either start or end time is specified. If none of start time, end time, and the page token is specified, sessions modified in the last 30 days are
|
|
844
|
+
* returned.
|
|
845
|
+
*/
|
|
846
|
+
pageToken?: string;
|
|
847
|
+
/** Returns response with indentations and line breaks. */
|
|
848
|
+
prettyPrint?: boolean;
|
|
849
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
850
|
+
quotaUser?: string;
|
|
851
|
+
/**
|
|
852
|
+
* An RFC3339 timestamp. Only sessions ending between the start and end times will be included in the response. If this time is omitted but endTime is specified, all sessions from
|
|
853
|
+
* the start of time up to endTime will be returned.
|
|
854
|
+
*/
|
|
855
|
+
startTime?: string;
|
|
856
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
857
|
+
upload_protocol?: string;
|
|
858
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
859
|
+
uploadType?: string;
|
|
860
|
+
/** List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
861
|
+
userId: string;
|
|
862
|
+
}): Request<ListSessionsResponse>;
|
|
863
|
+
/** Updates or insert a given session. */
|
|
864
|
+
update(request: {
|
|
865
|
+
/** V1 error format. */
|
|
866
|
+
"$.xgafv"?: string;
|
|
867
|
+
/** OAuth access token. */
|
|
868
|
+
access_token?: string;
|
|
869
|
+
/** Data format for response. */
|
|
870
|
+
alt?: string;
|
|
871
|
+
/** JSONP */
|
|
872
|
+
callback?: string;
|
|
873
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
874
|
+
fields?: string;
|
|
875
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
876
|
+
key?: string;
|
|
877
|
+
/** OAuth 2.0 token for the current user. */
|
|
878
|
+
oauth_token?: string;
|
|
879
|
+
/** Returns response with indentations and line breaks. */
|
|
880
|
+
prettyPrint?: boolean;
|
|
881
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
882
|
+
quotaUser?: string;
|
|
883
|
+
/** The ID of the session to be created. */
|
|
884
|
+
sessionId: string;
|
|
885
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
886
|
+
upload_protocol?: string;
|
|
887
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
888
|
+
uploadType?: string;
|
|
889
|
+
/** Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
890
|
+
userId: string;
|
|
891
|
+
/** Request body */
|
|
892
|
+
resource: Session;
|
|
893
|
+
}): Request<Session>;
|
|
894
|
+
update(request: {
|
|
895
|
+
/** V1 error format. */
|
|
896
|
+
"$.xgafv"?: string;
|
|
897
|
+
/** OAuth access token. */
|
|
898
|
+
access_token?: string;
|
|
899
|
+
/** Data format for response. */
|
|
900
|
+
alt?: string;
|
|
901
|
+
/** JSONP */
|
|
902
|
+
callback?: string;
|
|
903
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
904
|
+
fields?: string;
|
|
905
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
906
|
+
key?: string;
|
|
907
|
+
/** OAuth 2.0 token for the current user. */
|
|
908
|
+
oauth_token?: string;
|
|
909
|
+
/** Returns response with indentations and line breaks. */
|
|
910
|
+
prettyPrint?: boolean;
|
|
911
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
912
|
+
quotaUser?: string;
|
|
913
|
+
/** The ID of the session to be created. */
|
|
914
|
+
sessionId: string;
|
|
915
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
916
|
+
upload_protocol?: string;
|
|
917
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
918
|
+
uploadType?: string;
|
|
919
|
+
/** Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time. */
|
|
920
|
+
userId: string;
|
|
921
|
+
},
|
|
922
|
+
body: Session): Request<Session>;
|
|
923
|
+
}
|
|
924
|
+
interface UsersResource {
|
|
925
|
+
dataset: DatasetResource;
|
|
926
|
+
dataSources: DataSourcesResource;
|
|
927
|
+
sessions: SessionsResource;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
const users: UsersResource;
|
|
931
|
+
}
|
|
932
|
+
}
|