npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/google_smartdevicemanagement

v3.0.0

Published

DataFire integration for Smart Device Management API

Downloads

2

Readme

@datafire/google_smartdevicemanagement

Client library for Smart Device Management API

Installation and Usage

npm install --save @datafire/google_smartdevicemanagement
let google_smartdevicemanagement = require('@datafire/google_smartdevicemanagement').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Allow select enterprise partners to access, control, and manage Google and Nest devices programmatically.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

google_smartdevicemanagement.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

google_smartdevicemanagement.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

smartdevicemanagement.enterprises.structures.rooms.get

Gets a room managed by the enterprise.

google_smartdevicemanagement.smartdevicemanagement.enterprises.structures.rooms.get({
  "name": ""
}, context)

Input

  • input object
    • name required string: The name of the room requested. For example: "enterprises/XYZ/structures/ABC/rooms/123".
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

smartdevicemanagement.enterprises.devices.executeCommand

Executes a command to device managed by the enterprise.

google_smartdevicemanagement.smartdevicemanagement.enterprises.devices.executeCommand({
  "name": ""
}, context)

Input

  • input object
    • name required string: The name of the device requested. For example: "enterprises/XYZ/devices/123"
    • body GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

smartdevicemanagement.enterprises.devices.list

Lists devices managed by the enterprise.

google_smartdevicemanagement.smartdevicemanagement.enterprises.devices.list({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: The parent enterprise to list devices under. E.g. "enterprises/XYZ".
    • filter string: Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'
    • pageSize integer: Optional requested page size. Server may return fewer devices than requested. If unspecified, server will pick an appropriate default.
    • pageToken string: Optional token of the page to retrieve.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

smartdevicemanagement.enterprises.structures.rooms.list

Lists rooms managed by the enterprise.

google_smartdevicemanagement.smartdevicemanagement.enterprises.structures.rooms.list({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: The parent resource name of the rooms requested. For example: "enterprises/XYZ/structures/ABC".
    • pageSize integer: Requested page size. Server may return fewer rooms than requested. If unspecified, server will pick an appropriate default.
    • pageToken string: The token of the page to retrieve.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

smartdevicemanagement.enterprises.structures.list

Lists structures managed by the enterprise.

google_smartdevicemanagement.smartdevicemanagement.enterprises.structures.list({
  "parent": ""
}, context)

Input

  • input object
    • parent required string: The parent enterprise to list structures under. E.g. "enterprises/XYZ".
    • filter string: Optional filter to list structures.
    • pageSize integer: Requested page size. Server may return fewer structures than requested. If unspecified, server will pick an appropriate default.
    • pageToken string: The token of the page to retrieve.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: 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.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: 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.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

Definitions

GoogleHomeEnterpriseSdmV1Device

  • GoogleHomeEnterpriseSdmV1Device object: Device resource represents an instance of enterprise managed device in the property.
    • name string: Required. The resource name of the device. For example: "enterprises/XYZ/devices/123".
    • parentRelations array: Assignee details of the device.
    • traits object: Output only. Device traits.
    • type string: Output only. Type of the device for general display purposes. For example: "THERMOSTAT". The device type should not be used to deduce or infer functionality of the actual device it is assigned to. Instead, use the returned traits for the device.

GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest

  • GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest object: Request message for SmartDeviceManagementService.ExecuteDeviceCommand
    • command string: The command name to execute, represented by the fully qualified protobuf message name.
    • params object: The command message to execute, represented as a Struct.

GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse

  • GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse object: Response message for SmartDeviceManagementService.ExecuteDeviceCommand
    • results object: The results of executing the command.

GoogleHomeEnterpriseSdmV1ListDevicesResponse

  • GoogleHomeEnterpriseSdmV1ListDevicesResponse object: Response message for SmartDeviceManagementService.ListDevices

GoogleHomeEnterpriseSdmV1ListRoomsResponse

  • GoogleHomeEnterpriseSdmV1ListRoomsResponse object: Response message for SmartDeviceManagementService.ListRooms
    • nextPageToken string: The pagination token to retrieve the next page of results. If this field is omitted, there are no subsequent pages.
    • rooms array: The list of rooms.

GoogleHomeEnterpriseSdmV1ListStructuresResponse

  • GoogleHomeEnterpriseSdmV1ListStructuresResponse object: Response message for SmartDeviceManagementService.ListStructures
    • nextPageToken string: The pagination token to retrieve the next page of results. If this field is omitted, there are no subsequent pages.
    • structures array: The list of structures.

GoogleHomeEnterpriseSdmV1ParentRelation

  • GoogleHomeEnterpriseSdmV1ParentRelation object: Represents device relationships, for instance, structure/room to which the device is assigned to. For now this is only filled in the enterprise flow.
    • displayName string: Output only. The custom name of the relation -- e.g., structure/room where the device is assigned to.
    • parent string: Output only. The name of the relation -- e.g., structure/room where the device is assigned to. For example: "enterprises/XYZ/structures/ABC" or "enterprises/XYZ/structures/ABC/rooms/123"

GoogleHomeEnterpriseSdmV1Room

  • GoogleHomeEnterpriseSdmV1Room object: Room resource represents an instance of sub-space within a structure such as rooms in a hotel suite or rental apartment.
    • name string: Output only. The resource name of the room. For example: "enterprises/XYZ/structures/ABC/rooms/123".
    • traits object: Room traits.

GoogleHomeEnterpriseSdmV1Structure

  • GoogleHomeEnterpriseSdmV1Structure object: Structure resource represents an instance of enterprise managed home or hotel room.
    • name string: Output only. The resource name of the structure. For example: "enterprises/XYZ/structures/ABC".
    • traits object: Structure traits.