diff --git a/clients/home_graph/README.md b/clients/home_graph/README.md index 51c44a5a26..58857c9500 100644 --- a/clients/home_graph/README.md +++ b/clients/home_graph/README.md @@ -11,13 +11,13 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_home_graph, "~> 0.12"}] + [{:google_api_home_graph, "~> 0.13"}] end ``` ## For more information -Product documentation is available at [https://developers.google.com/actions/smarthome/create-app#request-sync](https://developers.google.com/actions/smarthome/create-app#request-sync). +Product documentation is available at [https://developers.home.google.com/cloud-to-cloud/get-started](https://developers.home.google.com/cloud-to-cloud/get-started). Library reference documentation is published on Hexdocs at [https://hexdocs.pm/google_api_home_graph](https://hexdocs.pm/google_api_home_graph). diff --git a/clients/home_graph/lib/google_api/home_graph/v1/api/agent_users.ex b/clients/home_graph/lib/google_api/home_graph/v1/api/agent_users.ex index 73a8d41e44..38dc0d2ccc 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/api/agent_users.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/api/agent_users.ex @@ -26,7 +26,7 @@ defmodule GoogleApi.HomeGraph.V1.Api.AgentUsers do @library_version Mix.Project.config() |> Keyword.get(:version, "") @doc """ - 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. + 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. ## Parameters diff --git a/clients/home_graph/lib/google_api/home_graph/v1/api/devices.ex b/clients/home_graph/lib/google_api/home_graph/v1/api/devices.ex index ddd9c76229..bb48351e73 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/api/devices.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/api/devices.ex @@ -85,7 +85,7 @@ defmodule GoogleApi.HomeGraph.V1.Api.Devices do end @doc """ - 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. + 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. ## Parameters @@ -150,7 +150,7 @@ defmodule GoogleApi.HomeGraph.V1.Api.Devices do end @doc """ - 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. + 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. ## Parameters diff --git a/clients/home_graph/lib/google_api/home_graph/v1/metadata.ex b/clients/home_graph/lib/google_api/home_graph/v1/metadata.ex index e444547c71..857fe5121a 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/metadata.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.HomeGraph.V1 do API client metadata for GoogleApi.HomeGraph.V1. """ - @discovery_revision "20220325" + @discovery_revision "20240226" def discovery_revision(), do: @discovery_revision end diff --git a/clients/home_graph/lib/google_api/home_graph/v1/model/device.ex b/clients/home_graph/lib/google_api/home_graph/v1/model/device.ex index 7f0ba591b5..3ac456e28a 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/model/device.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/model/device.ex @@ -17,21 +17,21 @@ defmodule GoogleApi.HomeGraph.V1.Model.Device do @moduledoc """ - Third-party device definition. Next ID = 14 + Third-party device definition. ## Attributes * `attributes` (*type:* `map()`, *default:* `nil`) - Attributes for the traits supported by the device. - * `customData` (*type:* `map()`, *default:* `nil`) - 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 [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 limited to Personally Identifiable Information. + * `customData` (*type:* `map()`, *default:* `nil`) - 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 [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 to Personally Identifiable Information. * `deviceInfo` (*type:* `GoogleApi.HomeGraph.V1.Model.DeviceInfo.t`, *default:* `nil`) - Device manufacturer, model, hardware version, and software version. * `id` (*type:* `String.t`, *default:* `nil`) - Third-party device ID. * `name` (*type:* `GoogleApi.HomeGraph.V1.Model.DeviceNames.t`, *default:* `nil`) - Names given to this device by your smart home Action. * `notificationSupportedByAgent` (*type:* `boolean()`, *default:* `nil`) - Indicates whether your smart home Action will report notifications to Google for this device via ReportStateAndNotification. If your smart home Action enables users to control device notifications, you should update this field and call RequestSyncDevices. - * `otherDeviceIds` (*type:* `list(GoogleApi.HomeGraph.V1.Model.AgentOtherDeviceId.t)`, *default:* `nil`) - Alternate IDs associated with this device. This is used to identify cloud synced devices enabled for [local fulfillment](https://developers.google.com/assistant/smarthome/concepts/local). + * `otherDeviceIds` (*type:* `list(GoogleApi.HomeGraph.V1.Model.AgentOtherDeviceId.t)`, *default:* `nil`) - 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). * `roomHint` (*type:* `String.t`, *default:* `nil`) - Suggested name for the room where this device is installed. Google attempts to use this value during user setup. * `structureHint` (*type:* `String.t`, *default:* `nil`) - Suggested name for the structure where this device is installed. Google attempts to use this value during user setup. - * `traits` (*type:* `list(String.t)`, *default:* `nil`) - Traits supported by the device. See [device traits](https://developers.google.com/assistant/smarthome/traits). - * `type` (*type:* `String.t`, *default:* `nil`) - Hardware type of the device. See [device types](https://developers.google.com/assistant/smarthome/guides). + * `traits` (*type:* `list(String.t)`, *default:* `nil`) - Traits supported by the device. See [device traits](https://developers.home.google.com/cloud-to-cloud/traits). + * `type` (*type:* `String.t`, *default:* `nil`) - Hardware type of the device. See [device types](https://developers.home.google.com/cloud-to-cloud/guides). * `willReportState` (*type:* `boolean()`, *default:* `nil`) - Indicates whether your smart home Action will report state of this device to Google via ReportStateAndNotification. """ diff --git a/clients/home_graph/lib/google_api/home_graph/v1/model/query_response.ex b/clients/home_graph/lib/google_api/home_graph/v1/model/query_response.ex index b49439a95c..ce72bc9f22 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/model/query_response.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/model/query_response.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.HomeGraph.V1.Model.QueryResponse do @moduledoc """ - Response type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. This should follow the same format as the Google smart home `action.devices.QUERY` [response](https://developers.google.com/assistant/smarthome/reference/intent/query). # Example ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "payload": { "devices": { "123": { "on": true, "online": true }, "456": { "on": true, "online": true, "brightness": 80, "color": { "name": "cerulean", "spectrumRGB": 31655 } } } } } ``` + Response type for the [`Query`](#google.home.graph.v1.HomeGraphApiService.Query) call. This should follow the same format as the Google smart home `action.devices.QUERY` [response](https://developers.home.google.com/cloud-to-cloud/intents/query). Example: ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "payload": { "devices": { "123": { "on": true, "online": true }, "456": { "on": true, "online": true, "brightness": 80, "color": { "name": "cerulean", "spectrumRGB": 31655 } } } } } ``` ## Attributes diff --git a/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_device.ex b/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_device.ex index 3e3dcf49d3..9ccdec48d3 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_device.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_device.ex @@ -21,8 +21,8 @@ defmodule GoogleApi.HomeGraph.V1.Model.ReportStateAndNotificationDevice do ## Attributes - * `notifications` (*type:* `map()`, *default:* `nil`) - Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits). - * `states` (*type:* `map()`, *default:* `nil`) - States of devices to update. See the **Device STATES** section of the individual trait [reference guides](https://developers.google.com/assistant/smarthome/traits). + * `notifications` (*type:* `map()`, *default:* `nil`) - Notifications metadata for devices. See the **Device NOTIFICATIONS** section of the individual trait [reference guides](https://developers.home.google.com/cloud-to-cloud/traits). + * `states` (*type:* `map()`, *default:* `nil`) - 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). """ use GoogleApi.Gax.ModelBase diff --git a/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_request.ex b/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_request.ex index a9cd09c793..2db76fc352 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_request.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/model/report_state_and_notification_request.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.HomeGraph.V1.Model.ReportStateAndNotificationRequest do @moduledoc """ - Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call. It may include states, notifications, or both. States and notifications are defined per `device_id` (for example, "123" and "456" in the following example). # Example ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId": "1234", "payload": { "devices": { "states": { "123": { "on": true }, "456": { "on": true, "brightness": 10 } }, } } } ``` + Request type for the [`ReportStateAndNotification`](#google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification) call. It may include states, notifications, or both. States and notifications are defined per `device_id` (for example, "123" and "456" in the following example). Example: ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "agentUserId": "1234", "payload": { "devices": { "states": { "123": { "on": true }, "456": { "on": true, "brightness": 10 } }, } } } ``` ## Attributes diff --git a/clients/home_graph/lib/google_api/home_graph/v1/model/sync_response.ex b/clients/home_graph/lib/google_api/home_graph/v1/model/sync_response.ex index ba91e046ca..09d221e75d 100644 --- a/clients/home_graph/lib/google_api/home_graph/v1/model/sync_response.ex +++ b/clients/home_graph/lib/google_api/home_graph/v1/model/sync_response.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.HomeGraph.V1.Model.SyncResponse do @moduledoc """ - Response type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call. This should follow the same format as the Google smart home `action.devices.SYNC` [response](https://developers.google.com/assistant/smarthome/reference/intent/sync). # Example ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "payload": { "agentUserId": "1836.15267389", "devices": [{ "id": "123", "type": "action.devices.types.OUTLET", "traits": [ "action.devices.traits.OnOff" ], "name": { "defaultNames": ["My Outlet 1234"], "name": "Night light", "nicknames": ["wall plug"] }, "willReportState": false, "deviceInfo": { "manufacturer": "lights-out-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" }, "customData": { "fooValue": 74, "barValue": true, "bazValue": "foo" } }] } } ``` + Response type for the [`Sync`](#google.home.graph.v1.HomeGraphApiService.Sync) call. This should follow the same format as the Google smart home `action.devices.SYNC` [response](https://developers.home.google.com/cloud-to-cloud/intents/sync). Example: ```json { "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "payload": { "agentUserId": "1836.15267389", "devices": [{ "id": "123", "type": "action.devices.types.OUTLET", "traits": [ "action.devices.traits.OnOff" ], "name": { "defaultNames": ["My Outlet 1234"], "name": "Night light", "nicknames": ["wall plug"] }, "willReportState": false, "deviceInfo": { "manufacturer": "lights-out-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" }, "customData": { "fooValue": 74, "barValue": true, "bazValue": "foo" } }] } } ``` ## Attributes diff --git a/clients/home_graph/mix.exs b/clients/home_graph/mix.exs index 7b837e34df..73b2d5a552 100644 --- a/clients/home_graph/mix.exs +++ b/clients/home_graph/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.HomeGraph.Mixfile do use Mix.Project - @version "0.12.1" + @version "0.13.0" def project() do [ @@ -59,7 +59,7 @@ defmodule GoogleApi.HomeGraph.Mixfile do licenses: ["Apache 2.0"], links: %{ "GitHub" => "https://github.com/googleapis/elixir-google-api/tree/master/clients/home_graph", - "Homepage" => "https://developers.google.com/actions/smarthome/create-app#request-sync" + "Homepage" => "https://developers.home.google.com/cloud-to-cloud/get-started" } ] end