@maxim_mazurok/gapi.client.homegraph-v1 0.0.20221221 → 0.0.20230106

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /* Type definitions for non-npm package HomeGraph API v1 0.0 */
2
- // Project: https://developers.google.com/actions/smarthome/create-app#request-sync
2
+ // Project: https://developers.home.google.com/cloud-to-cloud/get-started
3
3
  // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
4
  // Nick Amoscato <https://github.com/namoscato>
5
5
  // Declan Vong <https://github.com/declanvong>
@@ -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: 20221221
12
+ // Revision: 20230106
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -36,9 +36,9 @@ declare namespace gapi.client {
36
36
  /** Attributes for the traits supported by the device. */
37
37
  attributes?: { [P in string]: any };
38
38
  /**
39
- * Custom device attributes stored in Home Graph and provided to your smart home Action in each [QUERY](https://developers.google.com/assistant/smarthome/reference/intent/query) and
40
- * [EXECUTE](https://developers.google.com/assistant/smarthome/reference/intent/execute) intent. Data in this object has a few constraints: No sensitive information, including but not
41
- * limited to Personally Identifiable Information.
39
+ * Custom device attributes stored in Home Graph and provided to your smart home Action in each [QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) and
40
+ * [EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) intent. Data in this object has a few constraints: No sensitive information, including but not limited
41
+ * to Personally Identifiable Information.
42
42
  */
43
43
  customData?: { [P in string]: any };
44
44
  /** Device manufacturer, model, hardware version, and software version. */
@@ -52,18 +52,15 @@ declare namespace gapi.client {
52
52
  * device notifications, you should update this field and call RequestSyncDevices.
53
53
  */
54
54
  notificationSupportedByAgent?: boolean;
55
- /**
56
- * Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local
57
- * fulfillment](https://developers.google.com/assistant/smarthome/concepts/local).
58
- */
55
+ /** Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local fulfillment](https://developers.home.google.com/local-home/overview). */
59
56
  otherDeviceIds?: AgentOtherDeviceId[];
60
57
  /** Suggested name for the room where this device is installed. Google attempts to use this value during user setup. */
61
58
  roomHint?: string;
62
59
  /** Suggested name for the structure where this device is installed. Google attempts to use this value during user setup. */
63
60
  structureHint?: string;
64
- /** Traits supported by the device. See [device traits](https://developers.google.com/assistant/smarthome/traits). */
61
+ /** Traits supported by the device. See [device traits](https://developers.home.google.com/cloud-to-cloud/traits). */
65
62
  traits?: string[];
66
- /** Hardware type of the device. See [device types](https://developers.google.com/assistant/smarthome/guides). */
63
+ /** Hardware type of the device. See [device types](https://developers.home.google.com/cloud-to-cloud/guides). */
67
64
  type?: string;
68
65
  /** Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification. */
69
66
  willReportState?: boolean;
@@ -116,9 +113,9 @@ declare namespace gapi.client {
116
113
  devices?: { [P in string]: { [P in string]: any } };
117
114
  }
118
115
  interface ReportStateAndNotificationDevice {
119
- /** Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits). */
116
+ /** Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits). */
120
117
  notifications?: { [P in string]: any };
121
- /** States of devices to update. See the **Device STATES** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits). */
118
+ /** 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). */
122
119
  states?: { [P in string]: any };
123
120
  }
124
121
  interface ReportStateAndNotificationRequest {
@@ -174,7 +171,7 @@ declare namespace gapi.client {
174
171
  interface AgentUsersResource {
175
172
  /**
176
173
  * 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
177
- * and authentication](https://developers.google.com/assistant/smarthome/concepts/fulfillment-authentication). The third-party user's identity is passed in via the `agent_user_id` (see
174
+ * 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
178
175
  * DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project.
179
176
  */
180
177
  delete(request?: {
@@ -264,10 +261,10 @@ declare namespace gapi.client {
264
261
  body: QueryRequest): Request<QueryResponse>;
265
262
  /**
266
263
  * Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification
267
- * about the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report-state) for more information. This method updates the device state
268
- * according to its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices-traits). Publishing a new state value outside of these traits will result in an
269
- * `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized
270
- * using service account credentials from your Actions console project.
264
+ * about the device. See [Implement Report State](https://developers.home.google.com/cloud-to-cloud/integration/report-state) for more information. This method updates the device state
265
+ * according to its declared [traits](https://developers.home.google.com/cloud-to-cloud/primer/device-types-and-traits). Publishing a new state value outside of these traits will
266
+ * result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be
267
+ * authorized using service account credentials from your Actions console project.
271
268
  */
272
269
  reportStateAndNotification(request: {
273
270
  /** V1 error format. */
@@ -321,9 +318,9 @@ declare namespace gapi.client {
321
318
  },
322
319
  body: ReportStateAndNotificationRequest): Request<ReportStateAndNotificationResponse>;
323
320
  /**
324
- * Requests Google to send an `action.devices.SYNC` [intent](https://developers.google.com/assistant/smarthome/reference/intent/sync) to your smart home Action to update device
325
- * metadata for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account
326
- * credentials from your Actions console project.
321
+ * Requests Google to send an `action.devices.SYNC` [intent](https://developers.home.google.com/cloud-to-cloud/intents/sync) to your smart home Action to update device metadata for the
322
+ * given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from
323
+ * your Actions console project.
327
324
  */
328
325
  requestSync(request: {
329
326
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.homegraph-v1",
3
- "version": "0.0.20221221",
3
+ "version": "0.0.20230106",
4
4
  "description": "TypeScript typings for HomeGraph API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # TypeScript typings for HomeGraph API v1
2
2
 
3
3
 
4
- For detailed description please check [documentation](https://developers.google.com/actions/smarthome/create-app#request-sync).
4
+ For detailed description please check [documentation](https://developers.home.google.com/cloud-to-cloud/get-started).
5
5
 
6
6
  ## Installing
7
7
 
@@ -67,7 +67,7 @@ After that you can use HomeGraph API resources: <!-- TODO: make this work for mu
67
67
  ```typescript
68
68
 
69
69
  /*
70
- 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.google.com/assistant/smarthome/concepts/fulfillment-authentication). 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.
70
+ 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.
71
71
  */
72
72
  await gapi.client.homegraph.agentUsers.delete({ agentUserId: "agentUserId", });
73
73
 
@@ -77,12 +77,12 @@ Gets the current states in Home Graph for the given set of the third-party user'
77
77
  await gapi.client.homegraph.devices.query({ });
78
78
 
79
79
  /*
80
- Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report-state) for more information. This method updates the device state according to its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices-traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized using service account credentials from your Actions console project.
80
+ Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.home.google.com/cloud-to-cloud/integration/report-state) for more information. This method updates the device state according to its declared [traits](https://developers.home.google.com/cloud-to-cloud/primer/device-types-and-traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized using service account credentials from your Actions console project.
81
81
  */
82
82
  await gapi.client.homegraph.devices.reportStateAndNotification({ });
83
83
 
84
84
  /*
85
- Requests Google to send an `action.devices.SYNC` [intent](https://developers.google.com/assistant/smarthome/reference/intent/sync) to your smart home Action to update device metadata for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from your Actions console project.
85
+ Requests Google to send an `action.devices.SYNC` [intent](https://developers.home.google.com/cloud-to-cloud/intents/sync) to your smart home Action to update device metadata for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from your Actions console project.
86
86
  */
87
87
  await gapi.client.homegraph.devices.requestSync({ });
88
88
 
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20221221
6
+ // Revision: 20230106
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -31,8 +31,8 @@ gapi.load('client', async () => {
31
31
  async function run() {
32
32
  /**
33
33
  * 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
34
- * authentication](https://developers.google.com/assistant/smarthome/concepts/fulfillment-authentication). The third-party user's identity is passed in via the `agent_user_id` (see
35
- * DeleteAgentUserRequest). This request must be authorized using service account credentials from your Actions console project.
34
+ * 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).
35
+ * This request must be authorized using service account credentials from your Actions console project.
36
36
  */
37
37
  await gapi.client.homegraph.agentUsers.delete({
38
38
  agentUserId: "Test string",
@@ -60,8 +60,8 @@ gapi.load('client', async () => {
60
60
  });
61
61
  /**
62
62
  * Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about
63
- * the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report-state) for more information. This method updates the device state according to
64
- * its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices-traits). Publishing a new state value outside of these traits will result in an
63
+ * the device. See [Implement Report State](https://developers.home.google.com/cloud-to-cloud/integration/report-state) for more information. This method updates the device state according
64
+ * to its declared [traits](https://developers.home.google.com/cloud-to-cloud/primer/device-types-and-traits). Publishing a new state value outside of these traits will result in an
65
65
  * `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest). This request must be authorized using
66
66
  * service account credentials from your Actions console project.
67
67
  */
@@ -83,9 +83,9 @@ gapi.load('client', async () => {
83
83
  requestId: "Test string",
84
84
  });
85
85
  /**
86
- * Requests Google to send an `action.devices.SYNC` [intent](https://developers.google.com/assistant/smarthome/reference/intent/sync) to your smart home Action to update device metadata
87
- * for the given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials
88
- * from your Actions console project.
86
+ * Requests Google to send an `action.devices.SYNC` [intent](https://developers.home.google.com/cloud-to-cloud/intents/sync) to your smart home Action to update device metadata for the
87
+ * given user. The third-party user's identity is passed via the `agent_user_id` (see RequestSyncDevicesRequest). This request must be authorized using service account credentials from
88
+ * your Actions console project.
89
89
  */
90
90
  await gapi.client.homegraph.devices.requestSync({
91
91
  }, {