@googleapis/health 2.0.0 → 3.0.0
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/CHANGELOG.md +11 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v4.d.ts +284 -35
- package/build/v4.js +90 -0
- package/build/v4.js.map +1 -1
- package/package.json +1 -1
- package/v4.ts +467 -75
package/build/v4.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export declare namespace health_v4 {
|
|
|
68
68
|
export class Health {
|
|
69
69
|
context: APIRequestContext;
|
|
70
70
|
projects: Resource$Projects;
|
|
71
|
+
shl: Resource$Shl;
|
|
71
72
|
users: Resource$Users;
|
|
72
73
|
constructor(options: GlobalOptions, google?: GoogleConfigurable);
|
|
73
74
|
}
|
|
@@ -892,7 +893,7 @@ export declare namespace health_v4 {
|
|
|
892
893
|
*/
|
|
893
894
|
irregularRhythmNotification?: Schema$IrregularRhythmNotification;
|
|
894
895
|
/**
|
|
895
|
-
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `
|
|
896
|
+
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
|
|
896
897
|
*/
|
|
897
898
|
name?: string | null;
|
|
898
899
|
/**
|
|
@@ -1101,7 +1102,7 @@ export declare namespace health_v4 {
|
|
|
1101
1102
|
export interface Schema$Empty {
|
|
1102
1103
|
}
|
|
1103
1104
|
/**
|
|
1104
|
-
* Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `
|
|
1105
|
+
* Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the `GOOGLE-HEALTH-API-SIGNATURE` HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API's public key to confirm the payload was sent by the Health API.
|
|
1105
1106
|
*/
|
|
1106
1107
|
export interface Schema$EndpointAuthorization {
|
|
1107
1108
|
/**
|
|
@@ -1118,7 +1119,7 @@ export declare namespace health_v4 {
|
|
|
1118
1119
|
*/
|
|
1119
1120
|
export interface Schema$EnergyQuantity {
|
|
1120
1121
|
/**
|
|
1121
|
-
* Required.
|
|
1122
|
+
* Required. The energy value in kilocalories.
|
|
1122
1123
|
*/
|
|
1123
1124
|
kcal?: number | null;
|
|
1124
1125
|
/**
|
|
@@ -1365,6 +1366,15 @@ export declare namespace health_v4 {
|
|
|
1365
1366
|
*/
|
|
1366
1367
|
name?: string | null;
|
|
1367
1368
|
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Represents a user in the Google Health API. It matches the parent resource of collections owned by the user. Clients currently do not need to interact with this resource directly.
|
|
1371
|
+
*/
|
|
1372
|
+
export interface Schema$GoogleDevicesandservicesHealthV4User {
|
|
1373
|
+
/**
|
|
1374
|
+
* Identifier. The resource name of the user. The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. Format: `users/{user\}`
|
|
1375
|
+
*/
|
|
1376
|
+
name?: string | null;
|
|
1377
|
+
}
|
|
1368
1378
|
/**
|
|
1369
1379
|
* Log message for a webhook notification sent by the Google Health API to a subscriber's endpoint. Includes the HTTP response received from the endpoint.
|
|
1370
1380
|
*/
|
|
@@ -1502,6 +1512,25 @@ export declare namespace health_v4 {
|
|
|
1502
1512
|
*/
|
|
1503
1513
|
sampleTime?: Schema$ObservationSampleTime;
|
|
1504
1514
|
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
|
|
1517
|
+
*/
|
|
1518
|
+
export interface Schema$HttpBody {
|
|
1519
|
+
/**
|
|
1520
|
+
* The HTTP Content-Type header value specifying the content type of the body.
|
|
1521
|
+
*/
|
|
1522
|
+
contentType?: string | null;
|
|
1523
|
+
/**
|
|
1524
|
+
* The HTTP request/response body as raw binary.
|
|
1525
|
+
*/
|
|
1526
|
+
data?: string | null;
|
|
1527
|
+
/**
|
|
1528
|
+
* Application specific response metadata. Must be set in the first response for streaming APIs.
|
|
1529
|
+
*/
|
|
1530
|
+
extensions?: Array<{
|
|
1531
|
+
[key: string]: any;
|
|
1532
|
+
}> | null;
|
|
1533
|
+
}
|
|
1505
1534
|
/**
|
|
1506
1535
|
* Represents an HTTP header.
|
|
1507
1536
|
*/
|
|
@@ -1682,6 +1711,23 @@ export declare namespace health_v4 {
|
|
|
1682
1711
|
*/
|
|
1683
1712
|
subscriptions?: Schema$Subscription[];
|
|
1684
1713
|
}
|
|
1714
|
+
/**
|
|
1715
|
+
* Represents the POST body contained in a GetShlManifestRequest This message is nested to represent that See https://build.fhir.org/ig/HL7/smart-health-cards-and-links/links-specification.html#smart-health-link-manifest-request
|
|
1716
|
+
*/
|
|
1717
|
+
export interface Schema$ManifestParams {
|
|
1718
|
+
/**
|
|
1719
|
+
* Optional. Integer upper bound on the length of embedded payloads
|
|
1720
|
+
*/
|
|
1721
|
+
embeddedLengthMax?: number | null;
|
|
1722
|
+
/**
|
|
1723
|
+
* Optional.
|
|
1724
|
+
*/
|
|
1725
|
+
passcode?: string | null;
|
|
1726
|
+
/**
|
|
1727
|
+
* Required. A string describing the recipient (e.g.,the name of an organization or person) suitable for display to the Receiving User
|
|
1728
|
+
*/
|
|
1729
|
+
recipient?: string | null;
|
|
1730
|
+
}
|
|
1685
1731
|
/**
|
|
1686
1732
|
* Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).
|
|
1687
1733
|
*/
|
|
@@ -1790,11 +1836,11 @@ export declare namespace health_v4 {
|
|
|
1790
1836
|
*/
|
|
1791
1837
|
export interface Schema$NutrientQuantity {
|
|
1792
1838
|
/**
|
|
1793
|
-
* Required.
|
|
1839
|
+
* Required. The nutrient type.
|
|
1794
1840
|
*/
|
|
1795
1841
|
nutrient?: string | null;
|
|
1796
1842
|
/**
|
|
1797
|
-
* Required.
|
|
1843
|
+
* Required. The quantity of the nutrient, measured in grams.
|
|
1798
1844
|
*/
|
|
1799
1845
|
quantity?: Schema$WeightQuantity;
|
|
1800
1846
|
}
|
|
@@ -1812,47 +1858,47 @@ export declare namespace health_v4 {
|
|
|
1812
1858
|
quantity?: Schema$WeightQuantityRollup;
|
|
1813
1859
|
}
|
|
1814
1860
|
/**
|
|
1815
|
-
* Holds information about a user
|
|
1861
|
+
* Holds information about food logged by a user. There are two ways of creating a nutrition log based on the food type: 1. Identified food: Using the food field, which is a reference to a Food resource. In this case fields `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat`, `food_display_name` will be populated based on the referenced food. 2. Anonymous food: Using the `food_display_name` field and setting the `nutrients`, `energy`, `energy_from_fat`, `total_carbohydrate`, `total_fat` fields manually. The identified food is preferred over the anonymous food. Nutrition logs created from anonymous food are not editable.
|
|
1816
1862
|
*/
|
|
1817
1863
|
export interface Schema$NutritionLog {
|
|
1818
1864
|
/**
|
|
1819
|
-
* Optional.
|
|
1865
|
+
* Optional. The total energy of the food, measured in kilocalories (`kcal`).
|
|
1820
1866
|
*/
|
|
1821
1867
|
energy?: Schema$EnergyQuantity;
|
|
1822
1868
|
/**
|
|
1823
|
-
* Optional.
|
|
1869
|
+
* Optional. The energy from fat, measured in kilocalories (`kcal`).
|
|
1824
1870
|
*/
|
|
1825
1871
|
energyFromFat?: Schema$EnergyQuantity;
|
|
1826
1872
|
/**
|
|
1827
|
-
*
|
|
1873
|
+
* Optional. The resource name of the Food item. Required when creating a nutrition log from an identified food. For anonymous food logs, use the `food_display_name` field instead.
|
|
1828
1874
|
*/
|
|
1829
1875
|
food?: string | null;
|
|
1830
1876
|
/**
|
|
1831
|
-
*
|
|
1877
|
+
* The display name of the food. For identified food logs, this is populated automatically from the referenced food.
|
|
1832
1878
|
*/
|
|
1833
1879
|
foodDisplayName?: string | null;
|
|
1834
1880
|
/**
|
|
1835
|
-
* Required.
|
|
1881
|
+
* Required. The time window when the food was logged.
|
|
1836
1882
|
*/
|
|
1837
1883
|
interval?: Schema$SessionTimeInterval;
|
|
1838
1884
|
/**
|
|
1839
|
-
* Optional.
|
|
1885
|
+
* Optional. The meal category. One of `BREAKFAST`, `LUNCH`, `DINNER`, or `SNACK`.
|
|
1840
1886
|
*/
|
|
1841
1887
|
mealType?: string | null;
|
|
1842
1888
|
/**
|
|
1843
|
-
* Optional.
|
|
1889
|
+
* Optional. An array of individual nutrient values for the nutrition log.
|
|
1844
1890
|
*/
|
|
1845
1891
|
nutrients?: Schema$NutrientQuantity[];
|
|
1846
1892
|
/**
|
|
1847
|
-
* Optional.
|
|
1893
|
+
* Optional. The serving information for the logged food.
|
|
1848
1894
|
*/
|
|
1849
1895
|
serving?: Schema$Serving;
|
|
1850
1896
|
/**
|
|
1851
|
-
* Optional.
|
|
1897
|
+
* Optional. The total carbohydrate content, measured in grams.
|
|
1852
1898
|
*/
|
|
1853
1899
|
totalCarbohydrate?: Schema$WeightQuantity;
|
|
1854
1900
|
/**
|
|
1855
|
-
* Optional.
|
|
1901
|
+
* Optional. The total fat content, measured in grams.
|
|
1856
1902
|
*/
|
|
1857
1903
|
totalFat?: Schema$WeightQuantity;
|
|
1858
1904
|
}
|
|
@@ -2142,7 +2188,7 @@ export declare namespace health_v4 {
|
|
|
2142
2188
|
*/
|
|
2143
2189
|
dailyVo2Max?: Schema$DailyVO2Max;
|
|
2144
2190
|
/**
|
|
2145
|
-
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `
|
|
2191
|
+
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
|
|
2146
2192
|
*/
|
|
2147
2193
|
dataPointName?: string | null;
|
|
2148
2194
|
/**
|
|
@@ -2391,7 +2437,7 @@ export declare namespace health_v4 {
|
|
|
2391
2437
|
*/
|
|
2392
2438
|
range?: Schema$Interval;
|
|
2393
2439
|
/**
|
|
2394
|
-
* Required. The size of the time window to group data points into before applying the aggregation functions.
|
|
2440
|
+
* Required. The size of the time window to group data points into before applying the aggregation functions. Must be at least 1 second.
|
|
2395
2441
|
*/
|
|
2396
2442
|
windowSize?: string | null;
|
|
2397
2443
|
}
|
|
@@ -2461,7 +2507,7 @@ export declare namespace health_v4 {
|
|
|
2461
2507
|
*/
|
|
2462
2508
|
export interface Schema$Serving {
|
|
2463
2509
|
/**
|
|
2464
|
-
* Optional.
|
|
2510
|
+
* Optional. The number of servings.
|
|
2465
2511
|
*/
|
|
2466
2512
|
amount?: number | null;
|
|
2467
2513
|
/**
|
|
@@ -2580,7 +2626,7 @@ export declare namespace health_v4 {
|
|
|
2580
2626
|
*/
|
|
2581
2627
|
interval?: Schema$SessionTimeInterval;
|
|
2582
2628
|
/**
|
|
2583
|
-
* Optional. Sleep metadata:
|
|
2629
|
+
* Optional. Sleep metadata: `processed`, `main_sleep`, `manually_edited`, and `stages_status`.
|
|
2584
2630
|
*/
|
|
2585
2631
|
metadata?: Schema$SleepMetadata;
|
|
2586
2632
|
/**
|
|
@@ -2612,6 +2658,10 @@ export declare namespace health_v4 {
|
|
|
2612
2658
|
* Optional. Sleep identifier relevant in the context of the data source.
|
|
2613
2659
|
*/
|
|
2614
2660
|
externalId?: string | null;
|
|
2661
|
+
/**
|
|
2662
|
+
* Output only. `main_sleep`: the longest sleep session with stages within one day. If no sleep session has stages, then the longest sleep is the `main_sleep`. If there are multiple days of sleep in the response, there is one `main_sleep` per day.
|
|
2663
|
+
*/
|
|
2664
|
+
mainSleep?: boolean | null;
|
|
2615
2665
|
/**
|
|
2616
2666
|
* Output only. Some sleeps autodetected by algorithms can be manually edited by users.
|
|
2617
2667
|
*/
|
|
@@ -2621,7 +2671,7 @@ export declare namespace health_v4 {
|
|
|
2621
2671
|
*/
|
|
2622
2672
|
nap?: boolean | null;
|
|
2623
2673
|
/**
|
|
2624
|
-
* Output only. Sleep and sleep stages algorithms finished processing.
|
|
2674
|
+
* Output only. Sleep and sleep stages algorithms finished processing. A `true` value indicates whether all data processing for the session is complete. A `false` value means sleep period is detected but sleep stages is still processing.
|
|
2625
2675
|
*/
|
|
2626
2676
|
processed?: boolean | null;
|
|
2627
2677
|
/**
|
|
@@ -2833,7 +2883,7 @@ export declare namespace health_v4 {
|
|
|
2833
2883
|
*/
|
|
2834
2884
|
export interface Schema$Subscription {
|
|
2835
2885
|
/**
|
|
2836
|
-
* Optional. Data types subscribed to. A subscriber will only receive notifications for data types that are declared here. A subscription can only subscribe to the data types of the subscriber.
|
|
2886
|
+
* Optional. Data types subscribed to. A subscriber will only receive notifications for data types that are declared here. A subscription can only subscribe to the data types of the subscriber. The values should be in the format "users/{health_user_id\}/dataTypes/{data_type\}" where `{data_type\}` is one of "altitude", "distance", "floors", "sleep", "steps", "weight".
|
|
2837
2887
|
*/
|
|
2838
2888
|
dataTypes?: string[] | null;
|
|
2839
2889
|
/**
|
|
@@ -2962,7 +3012,7 @@ export declare namespace health_v4 {
|
|
|
2962
3012
|
version?: string | null;
|
|
2963
3013
|
}
|
|
2964
3014
|
/**
|
|
2965
|
-
* Represents the result of the rollup of the user's total calories.
|
|
3015
|
+
* Represents the result of the rollup of the user's total calories. Note: Queries for the `total-calories` data type must include a time interval filter (such as `total_calories.interval.start_time` or `total_calories.interval.civil_start_time`). The maximum range is 14 days. Example filter query: `total_calories.interval.start_time \>= "2026-04-20T00:00:00Z" AND total_calories.interval.start_time < "2026-04-21T00:00:00Z"`
|
|
2966
3016
|
*/
|
|
2967
3017
|
export interface Schema$TotalCaloriesRollupValue {
|
|
2968
3018
|
/**
|
|
@@ -3035,7 +3085,7 @@ export declare namespace health_v4 {
|
|
|
3035
3085
|
*/
|
|
3036
3086
|
export interface Schema$WeightQuantity {
|
|
3037
3087
|
/**
|
|
3038
|
-
* Required.
|
|
3088
|
+
* Required. The weight value in grams.
|
|
3039
3089
|
*/
|
|
3040
3090
|
grams?: number | null;
|
|
3041
3091
|
/**
|
|
@@ -3105,7 +3155,7 @@ export declare namespace health_v4 {
|
|
|
3105
3155
|
*
|
|
3106
3156
|
* // Do the magic
|
|
3107
3157
|
* const res = await health.projects.subscribers.create({
|
|
3108
|
-
* // Required. The parent resource where this subscriber will be created. Format: projects/{
|
|
3158
|
+
* // Required. The parent resource where this subscriber will be created. Format: projects/{project_number\} Example: projects/1234567890
|
|
3109
3159
|
* parent: 'projects/my-project',
|
|
3110
3160
|
* // Optional. The ID to use for the subscriber, which will become the final component of the subscriber's resource name. This value should be 4-36 characters, and valid characters are /[a-z]([a-z0-9-]{2,34\}[a-z0-9])/.
|
|
3111
3161
|
* subscriberId: 'placeholder-value',
|
|
@@ -3365,7 +3415,7 @@ export declare namespace health_v4 {
|
|
|
3365
3415
|
}
|
|
3366
3416
|
export interface Params$Resource$Projects$Subscribers$Create extends StandardParameters {
|
|
3367
3417
|
/**
|
|
3368
|
-
* Required. The parent resource where this subscriber will be created. Format: projects/{
|
|
3418
|
+
* Required. The parent resource where this subscriber will be created. Format: projects/{project_number\} Example: projects/1234567890
|
|
3369
3419
|
*/
|
|
3370
3420
|
parent?: string;
|
|
3371
3421
|
/**
|
|
@@ -3580,7 +3630,7 @@ export declare namespace health_v4 {
|
|
|
3580
3630
|
*
|
|
3581
3631
|
* // Do the magic
|
|
3582
3632
|
* const res = await health.projects.subscribers.subscriptions.list({
|
|
3583
|
-
* // Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `
|
|
3633
|
+
* // Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `health_user_id` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
3584
3634
|
* filter: 'placeholder-value',
|
|
3585
3635
|
* // Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
3586
3636
|
* pageSize: 'placeholder-value',
|
|
@@ -3713,7 +3763,7 @@ export declare namespace health_v4 {
|
|
|
3713
3763
|
}
|
|
3714
3764
|
export interface Params$Resource$Projects$Subscribers$Subscriptions$List extends StandardParameters {
|
|
3715
3765
|
/**
|
|
3716
|
-
* Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `
|
|
3766
|
+
* Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields: - `user` - `data_type` The `user` identifier (e.g., `user1` in `users/user1`) refers to the public `health_user_id` Example: user = "users/user1" Example: user = "users/user1" OR user = "users/user2" Example: user = "users/user1" AND (data_type = "sleep" OR data_type = "weight")
|
|
3717
3767
|
*/
|
|
3718
3768
|
filter?: string;
|
|
3719
3769
|
/**
|
|
@@ -3743,6 +3793,176 @@ export declare namespace health_v4 {
|
|
|
3743
3793
|
*/
|
|
3744
3794
|
requestBody?: Schema$Subscription;
|
|
3745
3795
|
}
|
|
3796
|
+
export class Resource$Shl {
|
|
3797
|
+
context: APIRequestContext;
|
|
3798
|
+
m: Resource$Shl$M;
|
|
3799
|
+
r: Resource$Shl$R;
|
|
3800
|
+
constructor(context: APIRequestContext);
|
|
3801
|
+
}
|
|
3802
|
+
export class Resource$Shl$M {
|
|
3803
|
+
context: APIRequestContext;
|
|
3804
|
+
constructor(context: APIRequestContext);
|
|
3805
|
+
/**
|
|
3806
|
+
* Forward a manifest request for a given SHL
|
|
3807
|
+
* @example
|
|
3808
|
+
* ```js
|
|
3809
|
+
* // Before running the sample:
|
|
3810
|
+
* // - Enable the API at:
|
|
3811
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3812
|
+
* // - Login into gcloud by running:
|
|
3813
|
+
* // ```sh
|
|
3814
|
+
* // $ gcloud auth application-default login
|
|
3815
|
+
* // ```
|
|
3816
|
+
* // - Install the npm module by running:
|
|
3817
|
+
* // ```sh
|
|
3818
|
+
* // $ npm install googleapis
|
|
3819
|
+
* // ```
|
|
3820
|
+
*
|
|
3821
|
+
* const {google} = require('googleapis');
|
|
3822
|
+
* const health = google.health('v4');
|
|
3823
|
+
*
|
|
3824
|
+
* async function main() {
|
|
3825
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3826
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3827
|
+
* scopes: [],
|
|
3828
|
+
* });
|
|
3829
|
+
*
|
|
3830
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3831
|
+
* const authClient = await auth.getClient();
|
|
3832
|
+
* google.options({auth: authClient});
|
|
3833
|
+
*
|
|
3834
|
+
* // Do the magic
|
|
3835
|
+
* const res = await health.shl.m.getShlManifest({
|
|
3836
|
+
* // Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
3837
|
+
* externalShlId: 'placeholder-value',
|
|
3838
|
+
*
|
|
3839
|
+
* // Request body metadata
|
|
3840
|
+
* requestBody: {
|
|
3841
|
+
* // request body parameters
|
|
3842
|
+
* // {
|
|
3843
|
+
* // "embeddedLengthMax": 0,
|
|
3844
|
+
* // "passcode": "my_passcode",
|
|
3845
|
+
* // "recipient": "my_recipient"
|
|
3846
|
+
* // }
|
|
3847
|
+
* },
|
|
3848
|
+
* });
|
|
3849
|
+
* console.log(res.data);
|
|
3850
|
+
*
|
|
3851
|
+
* // Example response
|
|
3852
|
+
* // {
|
|
3853
|
+
* // "contentType": "my_contentType",
|
|
3854
|
+
* // "data": "my_data",
|
|
3855
|
+
* // "extensions": []
|
|
3856
|
+
* // }
|
|
3857
|
+
* }
|
|
3858
|
+
*
|
|
3859
|
+
* main().catch(e => {
|
|
3860
|
+
* console.error(e);
|
|
3861
|
+
* throw e;
|
|
3862
|
+
* });
|
|
3863
|
+
*
|
|
3864
|
+
* ```
|
|
3865
|
+
*
|
|
3866
|
+
* @param params - Parameters for request
|
|
3867
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3868
|
+
* @param callback - Optional callback that handles the response.
|
|
3869
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3870
|
+
*/
|
|
3871
|
+
getShlManifest(params: Params$Resource$Shl$M$Getshlmanifest, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3872
|
+
getShlManifest(params?: Params$Resource$Shl$M$Getshlmanifest, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>;
|
|
3873
|
+
getShlManifest(params: Params$Resource$Shl$M$Getshlmanifest, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3874
|
+
getShlManifest(params: Params$Resource$Shl$M$Getshlmanifest, options: MethodOptions | BodyResponseCallback<Schema$HttpBody>, callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3875
|
+
getShlManifest(params: Params$Resource$Shl$M$Getshlmanifest, callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3876
|
+
getShlManifest(callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3877
|
+
}
|
|
3878
|
+
export interface Params$Resource$Shl$M$Getshlmanifest extends StandardParameters {
|
|
3879
|
+
/**
|
|
3880
|
+
* Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
3881
|
+
*/
|
|
3882
|
+
externalShlId?: string;
|
|
3883
|
+
/**
|
|
3884
|
+
* Request body metadata
|
|
3885
|
+
*/
|
|
3886
|
+
requestBody?: Schema$ManifestParams;
|
|
3887
|
+
}
|
|
3888
|
+
export class Resource$Shl$R {
|
|
3889
|
+
context: APIRequestContext;
|
|
3890
|
+
constructor(context: APIRequestContext);
|
|
3891
|
+
/**
|
|
3892
|
+
* Forward a resource request for a given SHL
|
|
3893
|
+
* @example
|
|
3894
|
+
* ```js
|
|
3895
|
+
* // Before running the sample:
|
|
3896
|
+
* // - Enable the API at:
|
|
3897
|
+
* // https://console.developers.google.com/apis/api/health.googleapis.com
|
|
3898
|
+
* // - Login into gcloud by running:
|
|
3899
|
+
* // ```sh
|
|
3900
|
+
* // $ gcloud auth application-default login
|
|
3901
|
+
* // ```
|
|
3902
|
+
* // - Install the npm module by running:
|
|
3903
|
+
* // ```sh
|
|
3904
|
+
* // $ npm install googleapis
|
|
3905
|
+
* // ```
|
|
3906
|
+
*
|
|
3907
|
+
* const {google} = require('googleapis');
|
|
3908
|
+
* const health = google.health('v4');
|
|
3909
|
+
*
|
|
3910
|
+
* async function main() {
|
|
3911
|
+
* const auth = new google.auth.GoogleAuth({
|
|
3912
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3913
|
+
* scopes: [],
|
|
3914
|
+
* });
|
|
3915
|
+
*
|
|
3916
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
3917
|
+
* const authClient = await auth.getClient();
|
|
3918
|
+
* google.options({auth: authClient});
|
|
3919
|
+
*
|
|
3920
|
+
* // Do the magic
|
|
3921
|
+
* const res = await health.shl.r.get({
|
|
3922
|
+
* // Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
3923
|
+
* externalShlId: 'placeholder-value',
|
|
3924
|
+
* // Required. Encoded, encrypted message containing resource access details
|
|
3925
|
+
* resourceToken: 'placeholder-value',
|
|
3926
|
+
* });
|
|
3927
|
+
* console.log(res.data);
|
|
3928
|
+
*
|
|
3929
|
+
* // Example response
|
|
3930
|
+
* // {
|
|
3931
|
+
* // "contentType": "my_contentType",
|
|
3932
|
+
* // "data": "my_data",
|
|
3933
|
+
* // "extensions": []
|
|
3934
|
+
* // }
|
|
3935
|
+
* }
|
|
3936
|
+
*
|
|
3937
|
+
* main().catch(e => {
|
|
3938
|
+
* console.error(e);
|
|
3939
|
+
* throw e;
|
|
3940
|
+
* });
|
|
3941
|
+
*
|
|
3942
|
+
* ```
|
|
3943
|
+
*
|
|
3944
|
+
* @param params - Parameters for request
|
|
3945
|
+
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
3946
|
+
* @param callback - Optional callback that handles the response.
|
|
3947
|
+
* @returns A promise if used with async/await, or void if used with a callback.
|
|
3948
|
+
*/
|
|
3949
|
+
get(params: Params$Resource$Shl$R$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
3950
|
+
get(params?: Params$Resource$Shl$R$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$HttpBody>>;
|
|
3951
|
+
get(params: Params$Resource$Shl$R$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
|
|
3952
|
+
get(params: Params$Resource$Shl$R$Get, options: MethodOptions | BodyResponseCallback<Schema$HttpBody>, callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3953
|
+
get(params: Params$Resource$Shl$R$Get, callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3954
|
+
get(callback: BodyResponseCallback<Schema$HttpBody>): void;
|
|
3955
|
+
}
|
|
3956
|
+
export interface Params$Resource$Shl$R$Get extends StandardParameters {
|
|
3957
|
+
/**
|
|
3958
|
+
* Required. External ID mapping to a ShlSharedLinkCapabilityToken object See https://docs.google.com/document/d/1Pch20pxJHRbsaMxp0EYgs3ZU0Gu7QTUznk8LhvbQvfY/edit?tab=t.0#heading=h.17wg41voij6q
|
|
3959
|
+
*/
|
|
3960
|
+
externalShlId?: string;
|
|
3961
|
+
/**
|
|
3962
|
+
* Required. Encoded, encrypted message containing resource access details
|
|
3963
|
+
*/
|
|
3964
|
+
resourceToken?: string;
|
|
3965
|
+
}
|
|
3746
3966
|
export class Resource$Users {
|
|
3747
3967
|
context: APIRequestContext;
|
|
3748
3968
|
dataTypes: Resource$Users$Datatypes;
|
|
@@ -3772,7 +3992,9 @@ export declare namespace health_v4 {
|
|
|
3772
3992
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
3773
3993
|
* scopes: [
|
|
3774
3994
|
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly',
|
|
3995
|
+
* 'https://www.googleapis.com/auth/googlehealth.ecg.readonly',
|
|
3775
3996
|
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly',
|
|
3997
|
+
* 'https://www.googleapis.com/auth/googlehealth.irn.readonly',
|
|
3776
3998
|
* 'https://www.googleapis.com/auth/googlehealth.profile.readonly',
|
|
3777
3999
|
* 'https://www.googleapis.com/auth/googlehealth.settings.readonly',
|
|
3778
4000
|
* 'https://www.googleapis.com/auth/googlehealth.sleep.readonly',
|
|
@@ -4041,7 +4263,7 @@ export declare namespace health_v4 {
|
|
|
4041
4263
|
* async function main() {
|
|
4042
4264
|
* const auth = new google.auth.GoogleAuth({
|
|
4043
4265
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4044
|
-
* scopes: [],
|
|
4266
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.profile.writeonly'],
|
|
4045
4267
|
* });
|
|
4046
4268
|
*
|
|
4047
4269
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4123,7 +4345,7 @@ export declare namespace health_v4 {
|
|
|
4123
4345
|
* async function main() {
|
|
4124
4346
|
* const auth = new google.auth.GoogleAuth({
|
|
4125
4347
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4126
|
-
* scopes: [],
|
|
4348
|
+
* scopes: ['https://www.googleapis.com/auth/googlehealth.settings.writeonly'],
|
|
4127
4349
|
* });
|
|
4128
4350
|
*
|
|
4129
4351
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4282,7 +4504,16 @@ export declare namespace health_v4 {
|
|
|
4282
4504
|
* async function main() {
|
|
4283
4505
|
* const auth = new google.auth.GoogleAuth({
|
|
4284
4506
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4285
|
-
* scopes: [
|
|
4507
|
+
* scopes: [
|
|
4508
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
4509
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
4510
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
4511
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
4512
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
4513
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
4514
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
4515
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
4516
|
+
* ],
|
|
4286
4517
|
* });
|
|
4287
4518
|
*
|
|
4288
4519
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4354,7 +4585,16 @@ export declare namespace health_v4 {
|
|
|
4354
4585
|
* async function main() {
|
|
4355
4586
|
* const auth = new google.auth.GoogleAuth({
|
|
4356
4587
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4357
|
-
* scopes: [
|
|
4588
|
+
* scopes: [
|
|
4589
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
4590
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
4591
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
4592
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
4593
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
4594
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
4595
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
4596
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
4597
|
+
* ],
|
|
4358
4598
|
* });
|
|
4359
4599
|
*
|
|
4360
4600
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4783,7 +5023,16 @@ export declare namespace health_v4 {
|
|
|
4783
5023
|
* async function main() {
|
|
4784
5024
|
* const auth = new google.auth.GoogleAuth({
|
|
4785
5025
|
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
4786
|
-
* scopes: [
|
|
5026
|
+
* scopes: [
|
|
5027
|
+
* 'https://www.googleapis.com/auth/googlehealth.activity_and_fitness.writeonly',
|
|
5028
|
+
* 'https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.writeonly',
|
|
5029
|
+
* 'https://www.googleapis.com/auth/googlehealth.location.writeonly',
|
|
5030
|
+
* 'https://www.googleapis.com/auth/googlehealth.logged_symptoms.writeonly',
|
|
5031
|
+
* 'https://www.googleapis.com/auth/googlehealth.mindfulness.writeonly',
|
|
5032
|
+
* 'https://www.googleapis.com/auth/googlehealth.nutrition.writeonly',
|
|
5033
|
+
* 'https://www.googleapis.com/auth/googlehealth.reproductive_health.writeonly',
|
|
5034
|
+
* 'https://www.googleapis.com/auth/googlehealth.sleep.writeonly',
|
|
5035
|
+
* ],
|
|
4787
5036
|
* });
|
|
4788
5037
|
*
|
|
4789
5038
|
* // Acquire an auth client, and bind it to all future calls
|
|
@@ -4792,7 +5041,7 @@ export declare namespace health_v4 {
|
|
|
4792
5041
|
*
|
|
4793
5042
|
* // Do the magic
|
|
4794
5043
|
* const res = await health.users.dataTypes.dataPoints.patch({
|
|
4795
|
-
* // Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `
|
|
5044
|
+
* // Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
|
|
4796
5045
|
* name: 'users/my-user/dataTypes/my-dataType/dataPoints/my-dataPoint',
|
|
4797
5046
|
*
|
|
4798
5047
|
* // Request body metadata
|
|
@@ -5091,7 +5340,7 @@ export declare namespace health_v4 {
|
|
|
5091
5340
|
}
|
|
5092
5341
|
export interface Params$Resource$Users$Datatypes$Datapoints$Patch extends StandardParameters {
|
|
5093
5342
|
/**
|
|
5094
|
-
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `
|
|
5343
|
+
* Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty. Format: `users/{user\}/dataTypes/{data_type\}/dataPoints/{data_point\}` Example: `users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef` The `{user\}` ID is a system-generated identifier, as described in Identity.health_user_id. The `{data_type\}` ID corresponds to the kebab-case version of the field names in the DataPoint data union field, e.g. `heart-rate` for the `heart_rate` field. The `{data_point\}` ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.
|
|
5095
5344
|
*/
|
|
5096
5345
|
name?: string;
|
|
5097
5346
|
/**
|