@maxim_mazurok/gapi.client.homegraph-v1 0.2.20260313 → 0.2.20260604

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.
Files changed (3) hide show
  1. package/index.d.ts +71 -1
  2. package/package.json +1 -1
  3. package/readme.md +12 -0
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://homegraph.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20260313
12
+ // Revision: 20260604
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -34,6 +34,22 @@ declare namespace gapi.client {
34
34
  /** Unique third-party device ID. */
35
35
  deviceId?: string;
36
36
  }
37
+ interface Component {
38
+ /** Optional. Child components. */
39
+ childComponents?: Component[];
40
+ /** Required. List of Device types associated with this component. Supported device types are defined in cs//depot/google3/home/homeservicelayer/uddm/types/uddm_device_types.proto and the type string is the enum name, for example: ON_OFF_LIGHT => "ON_OFF_LIGHT". */
41
+ deviceTypes?: string[];
42
+ /** Required. ID of the component from the device provider. */
43
+ id?: string;
44
+ /** Required. List of trait data associated with the component. */
45
+ traitData?: TraitData[];
46
+ }
47
+ interface ComponentTraitUpdates {
48
+ /** Required. ID of the component from the device provider. */
49
+ componentId?: string;
50
+ /** Required. The updated trait data for the component. */
51
+ traitData?: TraitData[];
52
+ }
37
53
  interface Device {
38
54
  /** Attributes for the traits supported by the device. */
39
55
  attributes?: {[P in string]: any};
@@ -70,6 +86,10 @@ declare namespace gapi.client {
70
86
  /** Device software version. */
71
87
  swVersion?: string;
72
88
  }
89
+ interface DeviceMetadata {
90
+ /** Map from the Trait ID (e.g., "action.devices.traits.OnOff") to its last Spanner commit timestamp. */
91
+ traitCommitTimestamps?: {[P in string]: string};
92
+ }
73
93
  interface DeviceNames {
74
94
  /** List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc. */
75
95
  defaultNames?: string[];
@@ -79,9 +99,47 @@ declare namespace gapi.client {
79
99
  nicknames?: string[];
80
100
  }
81
101
  interface Empty {}
102
+ interface EventData {
103
+ /** Required. The actual event payload. */
104
+ event?: {[P in string]: any};
105
+ /** Required. The unique event ID from the device provider. */
106
+ eventId?: string;
107
+ /** Required. The timestamp of the event. */
108
+ eventTime?: string;
109
+ }
110
+ interface Events {
111
+ /** Optional. The ID of the provider component if the events are associated with a specific component. Optional for WHDM events, required for UDDM events. */
112
+ componentId?: string;
113
+ /** Required. List of events associated with the component. */
114
+ events?: EventData[];
115
+ }
116
+ interface HomeEvents {
117
+ /** Required. / Unique identifier for the device. */
118
+ deviceId?: string;
119
+ /** Required. List of events for the item. */
120
+ events?: Events[];
121
+ }
122
+ interface HomeTraitPayload {
123
+ /** The root component of the device as reported by the provider. */
124
+ rootComponent?: Component;
125
+ }
126
+ interface HomeTraitUpdates {
127
+ /** Required. Trait updates for each component. */
128
+ components?: ComponentTraitUpdates[];
129
+ /** Required. Unique identifier for the device. */
130
+ deviceId?: string;
131
+ }
82
132
  interface QueryRequest {
83
133
  /** Required. Third-party user ID. */
84
134
  agentUserId?: string;
135
+ /** Optional. Specifies the type of device data to be returned in the response. This allows callers to request traditional Smart Home traits, Unified Device Data Model (UDDM) traits, or both. If unspecified, defaults to SMART_HOME_TRAIT_ONLY. */
136
+ deviceView?:
137
+ | 'DEVICE_VIEW_UNSPECIFIED'
138
+ | 'SMART_HOME_TRAIT_ONLY'
139
+ | 'HOME_TRAIT_ONLY'
140
+ | 'HOME_TRAIT_AND_SMART_HOME_TRAIT';
141
+ /** Optional. If true, the response will include device metadata in the device_metadata field. */
142
+ includeDeviceMetadata?: boolean;
85
143
  /** Required. Inputs containing third-party device IDs for which to get the device states. */
86
144
  inputs?: QueryRequestInput[];
87
145
  /** Request ID used for debugging. */
@@ -102,10 +160,18 @@ declare namespace gapi.client {
102
160
  requestId?: string;
103
161
  }
104
162
  interface QueryResponsePayload {
163
+ /** Map from the Trait ID (e.g., "action.devices.traits.OnOff") to its last Spanner commit timestamp. If a trait has no recorded timestamp, it will be omitted from this map. */
164
+ deviceMetadata?: {[P in string]: DeviceMetadata};
105
165
  /** States of the devices. Map of third-party device ID to struct of device states. */
106
166
  devices?: {[P in string]: {[P in string]: any}};
167
+ /** Map of device IDs to their Unified Device Data Model (UDDM) trait payloads. This field is populated when `device_view` is set to HOME_TRAIT_ONLY or HOME_TRAIT_AND_SMART_HOME_TRAIT. */
168
+ homeTraitPayload?: {[P in string]: HomeTraitPayload};
107
169
  }
108
170
  interface ReportStateAndNotificationDevice {
171
+ /** Optional. UDDM/WHDM trait events */
172
+ homeEvents?: HomeEvents[];
173
+ /** Optional. UDDM/WHDM trait updates. */
174
+ homeTraits?: HomeTraitUpdates[];
109
175
  /** Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits). */
110
176
  notifications?: {[P in string]: any};
111
177
  /** States of devices to update. See the **Device STATES** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits). */
@@ -156,6 +222,10 @@ declare namespace gapi.client {
156
222
  /** Devices associated with the third-party user. */
157
223
  devices?: Device[];
158
224
  }
225
+ interface TraitData {
226
+ /** The Provider Home API trait payload. */
227
+ trait?: {[P in string]: any};
228
+ }
159
229
  interface AgentUsersResource {
160
230
  /** Unlinks the given third-party user from your smart home Action. All data related to this user will be deleted. For more details on how users link their accounts, see [fulfillment and authentication](https://developers.home.google.com/cloud-to-cloud/primer/fulfillment). The third-party user's identity is passed in via the `agent_user_id` (see DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project. */
161
231
  delete(request?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.homegraph-v1",
3
- "version": "0.2.20260313",
3
+ "version": "0.2.20260604",
4
4
  "description": "TypeScript typings for HomeGraph API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -10,6 +10,18 @@ Install typings for HomeGraph API:
10
10
  npm install @types/gapi.client.homegraph-v1 --save-dev
11
11
  ```
12
12
 
13
+ ## TypeScript 6.0+
14
+
15
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
16
+
17
+ ```json
18
+ {
19
+ "compilerOptions": {
20
+ "types": ["gapi", "gapi.auth2", "gapi.client", "gapi.client.homegraph-v1"]
21
+ }
22
+ }
23
+ ```
24
+
13
25
  ## Usage
14
26
 
15
27
  You need to initialize Google API client in your code: