@googleapis/smartdevicemanagement 4.0.1 → 5.0.1
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 +25 -0
- package/build/v1.d.ts +340 -0
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +340 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v5.0.0...smartdevicemanagement-v5.0.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **smartdevicemanagement:** update the API ([825bb11](https://github.com/googleapis/google-api-nodejs-client/commit/825bb11d1547d916f25600ba84523fee4feddf0a))
|
|
9
|
+
* **smartdevicemanagement:** update the API ([ce349d9](https://github.com/googleapis/google-api-nodejs-client/commit/ce349d90b4eb7fbd9de0f3b47c96ad08b4513c70))
|
|
10
|
+
|
|
11
|
+
## [5.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v4.0.1...smartdevicemanagement-v5.0.0) (2025-06-30)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* upgrade to node 18
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
26
|
+
* **smartdevicemanagement:** update the API ([ce349d9](https://github.com/googleapis/google-api-nodejs-client/commit/ce349d90b4eb7fbd9de0f3b47c96ad08b4513c70))
|
|
27
|
+
|
|
3
28
|
## [4.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/smartdevicemanagement-v4.0.0...smartdevicemanagement-v4.0.1) (2025-06-04)
|
|
4
29
|
|
|
5
30
|
|
package/build/v1.d.ts
CHANGED
|
@@ -201,6 +201,61 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
201
201
|
constructor(context: APIRequestContext);
|
|
202
202
|
/**
|
|
203
203
|
* Executes a command to device managed by the enterprise.
|
|
204
|
+
* @example
|
|
205
|
+
* ```js
|
|
206
|
+
* // Before running the sample:
|
|
207
|
+
* // - Enable the API at:
|
|
208
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
209
|
+
* // - Login into gcloud by running:
|
|
210
|
+
* // ```sh
|
|
211
|
+
* // $ gcloud auth application-default login
|
|
212
|
+
* // ```
|
|
213
|
+
* // - Install the npm module by running:
|
|
214
|
+
* // ```sh
|
|
215
|
+
* // $ npm install googleapis
|
|
216
|
+
* // ```
|
|
217
|
+
*
|
|
218
|
+
* const {google} = require('googleapis');
|
|
219
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
220
|
+
*
|
|
221
|
+
* async function main() {
|
|
222
|
+
* const auth = new google.auth.GoogleAuth({
|
|
223
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
224
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
225
|
+
* });
|
|
226
|
+
*
|
|
227
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
228
|
+
* const authClient = await auth.getClient();
|
|
229
|
+
* google.options({auth: authClient});
|
|
230
|
+
*
|
|
231
|
+
* // Do the magic
|
|
232
|
+
* const res = await smartdevicemanagement.enterprises.devices.executeCommand({
|
|
233
|
+
* // The name of the device requested. For example: "enterprises/XYZ/devices/123"
|
|
234
|
+
* name: 'enterprises/my-enterprise/devices/my-device',
|
|
235
|
+
*
|
|
236
|
+
* // Request body metadata
|
|
237
|
+
* requestBody: {
|
|
238
|
+
* // request body parameters
|
|
239
|
+
* // {
|
|
240
|
+
* // "command": "my_command",
|
|
241
|
+
* // "params": {}
|
|
242
|
+
* // }
|
|
243
|
+
* },
|
|
244
|
+
* });
|
|
245
|
+
* console.log(res.data);
|
|
246
|
+
*
|
|
247
|
+
* // Example response
|
|
248
|
+
* // {
|
|
249
|
+
* // "results": {}
|
|
250
|
+
* // }
|
|
251
|
+
* }
|
|
252
|
+
*
|
|
253
|
+
* main().catch(e => {
|
|
254
|
+
* console.error(e);
|
|
255
|
+
* throw e;
|
|
256
|
+
* });
|
|
257
|
+
*
|
|
258
|
+
* ```
|
|
204
259
|
*
|
|
205
260
|
* @param params - Parameters for request
|
|
206
261
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -215,6 +270,55 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
215
270
|
executeCommand(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse>): void;
|
|
216
271
|
/**
|
|
217
272
|
* Gets a device managed by the enterprise.
|
|
273
|
+
* @example
|
|
274
|
+
* ```js
|
|
275
|
+
* // Before running the sample:
|
|
276
|
+
* // - Enable the API at:
|
|
277
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
278
|
+
* // - Login into gcloud by running:
|
|
279
|
+
* // ```sh
|
|
280
|
+
* // $ gcloud auth application-default login
|
|
281
|
+
* // ```
|
|
282
|
+
* // - Install the npm module by running:
|
|
283
|
+
* // ```sh
|
|
284
|
+
* // $ npm install googleapis
|
|
285
|
+
* // ```
|
|
286
|
+
*
|
|
287
|
+
* const {google} = require('googleapis');
|
|
288
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
289
|
+
*
|
|
290
|
+
* async function main() {
|
|
291
|
+
* const auth = new google.auth.GoogleAuth({
|
|
292
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
293
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
294
|
+
* });
|
|
295
|
+
*
|
|
296
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
297
|
+
* const authClient = await auth.getClient();
|
|
298
|
+
* google.options({auth: authClient});
|
|
299
|
+
*
|
|
300
|
+
* // Do the magic
|
|
301
|
+
* const res = await smartdevicemanagement.enterprises.devices.get({
|
|
302
|
+
* // The name of the device requested. For example: "enterprises/XYZ/devices/123"
|
|
303
|
+
* name: 'enterprises/my-enterprise/devices/my-device',
|
|
304
|
+
* });
|
|
305
|
+
* console.log(res.data);
|
|
306
|
+
*
|
|
307
|
+
* // Example response
|
|
308
|
+
* // {
|
|
309
|
+
* // "name": "my_name",
|
|
310
|
+
* // "parentRelations": [],
|
|
311
|
+
* // "traits": {},
|
|
312
|
+
* // "type": "my_type"
|
|
313
|
+
* // }
|
|
314
|
+
* }
|
|
315
|
+
*
|
|
316
|
+
* main().catch(e => {
|
|
317
|
+
* console.error(e);
|
|
318
|
+
* throw e;
|
|
319
|
+
* });
|
|
320
|
+
*
|
|
321
|
+
* ```
|
|
218
322
|
*
|
|
219
323
|
* @param params - Parameters for request
|
|
220
324
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -229,6 +333,54 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
229
333
|
get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Device>): void;
|
|
230
334
|
/**
|
|
231
335
|
* Lists devices managed by the enterprise.
|
|
336
|
+
* @example
|
|
337
|
+
* ```js
|
|
338
|
+
* // Before running the sample:
|
|
339
|
+
* // - Enable the API at:
|
|
340
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
341
|
+
* // - Login into gcloud by running:
|
|
342
|
+
* // ```sh
|
|
343
|
+
* // $ gcloud auth application-default login
|
|
344
|
+
* // ```
|
|
345
|
+
* // - Install the npm module by running:
|
|
346
|
+
* // ```sh
|
|
347
|
+
* // $ npm install googleapis
|
|
348
|
+
* // ```
|
|
349
|
+
*
|
|
350
|
+
* const {google} = require('googleapis');
|
|
351
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
352
|
+
*
|
|
353
|
+
* async function main() {
|
|
354
|
+
* const auth = new google.auth.GoogleAuth({
|
|
355
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
356
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
357
|
+
* });
|
|
358
|
+
*
|
|
359
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
360
|
+
* const authClient = await auth.getClient();
|
|
361
|
+
* google.options({auth: authClient});
|
|
362
|
+
*
|
|
363
|
+
* // Do the magic
|
|
364
|
+
* const res = await smartdevicemanagement.enterprises.devices.list({
|
|
365
|
+
* // Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'
|
|
366
|
+
* filter: 'placeholder-value',
|
|
367
|
+
* // The parent enterprise to list devices under. E.g. "enterprises/XYZ".
|
|
368
|
+
* parent: 'enterprises/my-enterprise',
|
|
369
|
+
* });
|
|
370
|
+
* console.log(res.data);
|
|
371
|
+
*
|
|
372
|
+
* // Example response
|
|
373
|
+
* // {
|
|
374
|
+
* // "devices": []
|
|
375
|
+
* // }
|
|
376
|
+
* }
|
|
377
|
+
*
|
|
378
|
+
* main().catch(e => {
|
|
379
|
+
* console.error(e);
|
|
380
|
+
* throw e;
|
|
381
|
+
* });
|
|
382
|
+
*
|
|
383
|
+
* ```
|
|
232
384
|
*
|
|
233
385
|
* @param params - Parameters for request
|
|
234
386
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -274,6 +426,53 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
274
426
|
constructor(context: APIRequestContext);
|
|
275
427
|
/**
|
|
276
428
|
* Gets a structure managed by the enterprise.
|
|
429
|
+
* @example
|
|
430
|
+
* ```js
|
|
431
|
+
* // Before running the sample:
|
|
432
|
+
* // - Enable the API at:
|
|
433
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
434
|
+
* // - Login into gcloud by running:
|
|
435
|
+
* // ```sh
|
|
436
|
+
* // $ gcloud auth application-default login
|
|
437
|
+
* // ```
|
|
438
|
+
* // - Install the npm module by running:
|
|
439
|
+
* // ```sh
|
|
440
|
+
* // $ npm install googleapis
|
|
441
|
+
* // ```
|
|
442
|
+
*
|
|
443
|
+
* const {google} = require('googleapis');
|
|
444
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
445
|
+
*
|
|
446
|
+
* async function main() {
|
|
447
|
+
* const auth = new google.auth.GoogleAuth({
|
|
448
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
449
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
450
|
+
* });
|
|
451
|
+
*
|
|
452
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
453
|
+
* const authClient = await auth.getClient();
|
|
454
|
+
* google.options({auth: authClient});
|
|
455
|
+
*
|
|
456
|
+
* // Do the magic
|
|
457
|
+
* const res = await smartdevicemanagement.enterprises.structures.get({
|
|
458
|
+
* // The name of the structure requested. For example: "enterprises/XYZ/structures/ABC".
|
|
459
|
+
* name: 'enterprises/my-enterprise/structures/my-structure',
|
|
460
|
+
* });
|
|
461
|
+
* console.log(res.data);
|
|
462
|
+
*
|
|
463
|
+
* // Example response
|
|
464
|
+
* // {
|
|
465
|
+
* // "name": "my_name",
|
|
466
|
+
* // "traits": {}
|
|
467
|
+
* // }
|
|
468
|
+
* }
|
|
469
|
+
*
|
|
470
|
+
* main().catch(e => {
|
|
471
|
+
* console.error(e);
|
|
472
|
+
* throw e;
|
|
473
|
+
* });
|
|
474
|
+
*
|
|
475
|
+
* ```
|
|
277
476
|
*
|
|
278
477
|
* @param params - Parameters for request
|
|
279
478
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -288,6 +487,54 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
288
487
|
get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Structure>): void;
|
|
289
488
|
/**
|
|
290
489
|
* Lists structures managed by the enterprise.
|
|
490
|
+
* @example
|
|
491
|
+
* ```js
|
|
492
|
+
* // Before running the sample:
|
|
493
|
+
* // - Enable the API at:
|
|
494
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
495
|
+
* // - Login into gcloud by running:
|
|
496
|
+
* // ```sh
|
|
497
|
+
* // $ gcloud auth application-default login
|
|
498
|
+
* // ```
|
|
499
|
+
* // - Install the npm module by running:
|
|
500
|
+
* // ```sh
|
|
501
|
+
* // $ npm install googleapis
|
|
502
|
+
* // ```
|
|
503
|
+
*
|
|
504
|
+
* const {google} = require('googleapis');
|
|
505
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
506
|
+
*
|
|
507
|
+
* async function main() {
|
|
508
|
+
* const auth = new google.auth.GoogleAuth({
|
|
509
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
510
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
511
|
+
* });
|
|
512
|
+
*
|
|
513
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
514
|
+
* const authClient = await auth.getClient();
|
|
515
|
+
* google.options({auth: authClient});
|
|
516
|
+
*
|
|
517
|
+
* // Do the magic
|
|
518
|
+
* const res = await smartdevicemanagement.enterprises.structures.list({
|
|
519
|
+
* // Optional filter to list structures.
|
|
520
|
+
* filter: 'placeholder-value',
|
|
521
|
+
* // The parent enterprise to list structures under. E.g. "enterprises/XYZ".
|
|
522
|
+
* parent: 'enterprises/my-enterprise',
|
|
523
|
+
* });
|
|
524
|
+
* console.log(res.data);
|
|
525
|
+
*
|
|
526
|
+
* // Example response
|
|
527
|
+
* // {
|
|
528
|
+
* // "structures": []
|
|
529
|
+
* // }
|
|
530
|
+
* }
|
|
531
|
+
*
|
|
532
|
+
* main().catch(e => {
|
|
533
|
+
* console.error(e);
|
|
534
|
+
* throw e;
|
|
535
|
+
* });
|
|
536
|
+
*
|
|
537
|
+
* ```
|
|
291
538
|
*
|
|
292
539
|
* @param params - Parameters for request
|
|
293
540
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -322,6 +569,53 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
322
569
|
constructor(context: APIRequestContext);
|
|
323
570
|
/**
|
|
324
571
|
* Gets a room managed by the enterprise.
|
|
572
|
+
* @example
|
|
573
|
+
* ```js
|
|
574
|
+
* // Before running the sample:
|
|
575
|
+
* // - Enable the API at:
|
|
576
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
577
|
+
* // - Login into gcloud by running:
|
|
578
|
+
* // ```sh
|
|
579
|
+
* // $ gcloud auth application-default login
|
|
580
|
+
* // ```
|
|
581
|
+
* // - Install the npm module by running:
|
|
582
|
+
* // ```sh
|
|
583
|
+
* // $ npm install googleapis
|
|
584
|
+
* // ```
|
|
585
|
+
*
|
|
586
|
+
* const {google} = require('googleapis');
|
|
587
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
588
|
+
*
|
|
589
|
+
* async function main() {
|
|
590
|
+
* const auth = new google.auth.GoogleAuth({
|
|
591
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
592
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
593
|
+
* });
|
|
594
|
+
*
|
|
595
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
596
|
+
* const authClient = await auth.getClient();
|
|
597
|
+
* google.options({auth: authClient});
|
|
598
|
+
*
|
|
599
|
+
* // Do the magic
|
|
600
|
+
* const res = await smartdevicemanagement.enterprises.structures.rooms.get({
|
|
601
|
+
* // The name of the room requested. For example: "enterprises/XYZ/structures/ABC/rooms/123".
|
|
602
|
+
* name: 'enterprises/my-enterprise/structures/my-structure/rooms/my-room',
|
|
603
|
+
* });
|
|
604
|
+
* console.log(res.data);
|
|
605
|
+
*
|
|
606
|
+
* // Example response
|
|
607
|
+
* // {
|
|
608
|
+
* // "name": "my_name",
|
|
609
|
+
* // "traits": {}
|
|
610
|
+
* // }
|
|
611
|
+
* }
|
|
612
|
+
*
|
|
613
|
+
* main().catch(e => {
|
|
614
|
+
* console.error(e);
|
|
615
|
+
* throw e;
|
|
616
|
+
* });
|
|
617
|
+
*
|
|
618
|
+
* ```
|
|
325
619
|
*
|
|
326
620
|
* @param params - Parameters for request
|
|
327
621
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -336,6 +630,52 @@ export declare namespace smartdevicemanagement_v1 {
|
|
|
336
630
|
get(callback: BodyResponseCallback<Schema$GoogleHomeEnterpriseSdmV1Room>): void;
|
|
337
631
|
/**
|
|
338
632
|
* Lists rooms managed by the enterprise.
|
|
633
|
+
* @example
|
|
634
|
+
* ```js
|
|
635
|
+
* // Before running the sample:
|
|
636
|
+
* // - Enable the API at:
|
|
637
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
638
|
+
* // - Login into gcloud by running:
|
|
639
|
+
* // ```sh
|
|
640
|
+
* // $ gcloud auth application-default login
|
|
641
|
+
* // ```
|
|
642
|
+
* // - Install the npm module by running:
|
|
643
|
+
* // ```sh
|
|
644
|
+
* // $ npm install googleapis
|
|
645
|
+
* // ```
|
|
646
|
+
*
|
|
647
|
+
* const {google} = require('googleapis');
|
|
648
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
649
|
+
*
|
|
650
|
+
* async function main() {
|
|
651
|
+
* const auth = new google.auth.GoogleAuth({
|
|
652
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
653
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
654
|
+
* });
|
|
655
|
+
*
|
|
656
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
657
|
+
* const authClient = await auth.getClient();
|
|
658
|
+
* google.options({auth: authClient});
|
|
659
|
+
*
|
|
660
|
+
* // Do the magic
|
|
661
|
+
* const res = await smartdevicemanagement.enterprises.structures.rooms.list({
|
|
662
|
+
* // The parent resource name of the rooms requested. For example: "enterprises/XYZ/structures/ABC".
|
|
663
|
+
* parent: 'enterprises/my-enterprise/structures/my-structure',
|
|
664
|
+
* });
|
|
665
|
+
* console.log(res.data);
|
|
666
|
+
*
|
|
667
|
+
* // Example response
|
|
668
|
+
* // {
|
|
669
|
+
* // "rooms": []
|
|
670
|
+
* // }
|
|
671
|
+
* }
|
|
672
|
+
*
|
|
673
|
+
* main().catch(e => {
|
|
674
|
+
* console.error(e);
|
|
675
|
+
* throw e;
|
|
676
|
+
* });
|
|
677
|
+
*
|
|
678
|
+
* ```
|
|
339
679
|
*
|
|
340
680
|
* @param params - Parameters for request
|
|
341
681
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAu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
253
253
|
|
|
254
254
|
/**
|
|
255
255
|
* Executes a command to device managed by the enterprise.
|
|
256
|
+
* @example
|
|
257
|
+
* ```js
|
|
258
|
+
* // Before running the sample:
|
|
259
|
+
* // - Enable the API at:
|
|
260
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
261
|
+
* // - Login into gcloud by running:
|
|
262
|
+
* // ```sh
|
|
263
|
+
* // $ gcloud auth application-default login
|
|
264
|
+
* // ```
|
|
265
|
+
* // - Install the npm module by running:
|
|
266
|
+
* // ```sh
|
|
267
|
+
* // $ npm install googleapis
|
|
268
|
+
* // ```
|
|
269
|
+
*
|
|
270
|
+
* const {google} = require('googleapis');
|
|
271
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
272
|
+
*
|
|
273
|
+
* async function main() {
|
|
274
|
+
* const auth = new google.auth.GoogleAuth({
|
|
275
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
276
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
277
|
+
* });
|
|
278
|
+
*
|
|
279
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
280
|
+
* const authClient = await auth.getClient();
|
|
281
|
+
* google.options({auth: authClient});
|
|
282
|
+
*
|
|
283
|
+
* // Do the magic
|
|
284
|
+
* const res = await smartdevicemanagement.enterprises.devices.executeCommand({
|
|
285
|
+
* // The name of the device requested. For example: "enterprises/XYZ/devices/123"
|
|
286
|
+
* name: 'enterprises/my-enterprise/devices/my-device',
|
|
287
|
+
*
|
|
288
|
+
* // Request body metadata
|
|
289
|
+
* requestBody: {
|
|
290
|
+
* // request body parameters
|
|
291
|
+
* // {
|
|
292
|
+
* // "command": "my_command",
|
|
293
|
+
* // "params": {}
|
|
294
|
+
* // }
|
|
295
|
+
* },
|
|
296
|
+
* });
|
|
297
|
+
* console.log(res.data);
|
|
298
|
+
*
|
|
299
|
+
* // Example response
|
|
300
|
+
* // {
|
|
301
|
+
* // "results": {}
|
|
302
|
+
* // }
|
|
303
|
+
* }
|
|
304
|
+
*
|
|
305
|
+
* main().catch(e => {
|
|
306
|
+
* console.error(e);
|
|
307
|
+
* throw e;
|
|
308
|
+
* });
|
|
309
|
+
*
|
|
310
|
+
* ```
|
|
256
311
|
*
|
|
257
312
|
* @param params - Parameters for request
|
|
258
313
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -355,6 +410,55 @@ export namespace smartdevicemanagement_v1 {
|
|
|
355
410
|
|
|
356
411
|
/**
|
|
357
412
|
* Gets a device managed by the enterprise.
|
|
413
|
+
* @example
|
|
414
|
+
* ```js
|
|
415
|
+
* // Before running the sample:
|
|
416
|
+
* // - Enable the API at:
|
|
417
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
418
|
+
* // - Login into gcloud by running:
|
|
419
|
+
* // ```sh
|
|
420
|
+
* // $ gcloud auth application-default login
|
|
421
|
+
* // ```
|
|
422
|
+
* // - Install the npm module by running:
|
|
423
|
+
* // ```sh
|
|
424
|
+
* // $ npm install googleapis
|
|
425
|
+
* // ```
|
|
426
|
+
*
|
|
427
|
+
* const {google} = require('googleapis');
|
|
428
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
429
|
+
*
|
|
430
|
+
* async function main() {
|
|
431
|
+
* const auth = new google.auth.GoogleAuth({
|
|
432
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
433
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
434
|
+
* });
|
|
435
|
+
*
|
|
436
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
437
|
+
* const authClient = await auth.getClient();
|
|
438
|
+
* google.options({auth: authClient});
|
|
439
|
+
*
|
|
440
|
+
* // Do the magic
|
|
441
|
+
* const res = await smartdevicemanagement.enterprises.devices.get({
|
|
442
|
+
* // The name of the device requested. For example: "enterprises/XYZ/devices/123"
|
|
443
|
+
* name: 'enterprises/my-enterprise/devices/my-device',
|
|
444
|
+
* });
|
|
445
|
+
* console.log(res.data);
|
|
446
|
+
*
|
|
447
|
+
* // Example response
|
|
448
|
+
* // {
|
|
449
|
+
* // "name": "my_name",
|
|
450
|
+
* // "parentRelations": [],
|
|
451
|
+
* // "traits": {},
|
|
452
|
+
* // "type": "my_type"
|
|
453
|
+
* // }
|
|
454
|
+
* }
|
|
455
|
+
*
|
|
456
|
+
* main().catch(e => {
|
|
457
|
+
* console.error(e);
|
|
458
|
+
* throw e;
|
|
459
|
+
* });
|
|
460
|
+
*
|
|
461
|
+
* ```
|
|
358
462
|
*
|
|
359
463
|
* @param params - Parameters for request
|
|
360
464
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -450,6 +554,54 @@ export namespace smartdevicemanagement_v1 {
|
|
|
450
554
|
|
|
451
555
|
/**
|
|
452
556
|
* Lists devices managed by the enterprise.
|
|
557
|
+
* @example
|
|
558
|
+
* ```js
|
|
559
|
+
* // Before running the sample:
|
|
560
|
+
* // - Enable the API at:
|
|
561
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
562
|
+
* // - Login into gcloud by running:
|
|
563
|
+
* // ```sh
|
|
564
|
+
* // $ gcloud auth application-default login
|
|
565
|
+
* // ```
|
|
566
|
+
* // - Install the npm module by running:
|
|
567
|
+
* // ```sh
|
|
568
|
+
* // $ npm install googleapis
|
|
569
|
+
* // ```
|
|
570
|
+
*
|
|
571
|
+
* const {google} = require('googleapis');
|
|
572
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
573
|
+
*
|
|
574
|
+
* async function main() {
|
|
575
|
+
* const auth = new google.auth.GoogleAuth({
|
|
576
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
577
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
578
|
+
* });
|
|
579
|
+
*
|
|
580
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
581
|
+
* const authClient = await auth.getClient();
|
|
582
|
+
* google.options({auth: authClient});
|
|
583
|
+
*
|
|
584
|
+
* // Do the magic
|
|
585
|
+
* const res = await smartdevicemanagement.enterprises.devices.list({
|
|
586
|
+
* // Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'
|
|
587
|
+
* filter: 'placeholder-value',
|
|
588
|
+
* // The parent enterprise to list devices under. E.g. "enterprises/XYZ".
|
|
589
|
+
* parent: 'enterprises/my-enterprise',
|
|
590
|
+
* });
|
|
591
|
+
* console.log(res.data);
|
|
592
|
+
*
|
|
593
|
+
* // Example response
|
|
594
|
+
* // {
|
|
595
|
+
* // "devices": []
|
|
596
|
+
* // }
|
|
597
|
+
* }
|
|
598
|
+
*
|
|
599
|
+
* main().catch(e => {
|
|
600
|
+
* console.error(e);
|
|
601
|
+
* throw e;
|
|
602
|
+
* });
|
|
603
|
+
*
|
|
604
|
+
* ```
|
|
453
605
|
*
|
|
454
606
|
* @param params - Parameters for request
|
|
455
607
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -592,6 +744,53 @@ export namespace smartdevicemanagement_v1 {
|
|
|
592
744
|
|
|
593
745
|
/**
|
|
594
746
|
* Gets a structure managed by the enterprise.
|
|
747
|
+
* @example
|
|
748
|
+
* ```js
|
|
749
|
+
* // Before running the sample:
|
|
750
|
+
* // - Enable the API at:
|
|
751
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
752
|
+
* // - Login into gcloud by running:
|
|
753
|
+
* // ```sh
|
|
754
|
+
* // $ gcloud auth application-default login
|
|
755
|
+
* // ```
|
|
756
|
+
* // - Install the npm module by running:
|
|
757
|
+
* // ```sh
|
|
758
|
+
* // $ npm install googleapis
|
|
759
|
+
* // ```
|
|
760
|
+
*
|
|
761
|
+
* const {google} = require('googleapis');
|
|
762
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
763
|
+
*
|
|
764
|
+
* async function main() {
|
|
765
|
+
* const auth = new google.auth.GoogleAuth({
|
|
766
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
767
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
768
|
+
* });
|
|
769
|
+
*
|
|
770
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
771
|
+
* const authClient = await auth.getClient();
|
|
772
|
+
* google.options({auth: authClient});
|
|
773
|
+
*
|
|
774
|
+
* // Do the magic
|
|
775
|
+
* const res = await smartdevicemanagement.enterprises.structures.get({
|
|
776
|
+
* // The name of the structure requested. For example: "enterprises/XYZ/structures/ABC".
|
|
777
|
+
* name: 'enterprises/my-enterprise/structures/my-structure',
|
|
778
|
+
* });
|
|
779
|
+
* console.log(res.data);
|
|
780
|
+
*
|
|
781
|
+
* // Example response
|
|
782
|
+
* // {
|
|
783
|
+
* // "name": "my_name",
|
|
784
|
+
* // "traits": {}
|
|
785
|
+
* // }
|
|
786
|
+
* }
|
|
787
|
+
*
|
|
788
|
+
* main().catch(e => {
|
|
789
|
+
* console.error(e);
|
|
790
|
+
* throw e;
|
|
791
|
+
* });
|
|
792
|
+
*
|
|
793
|
+
* ```
|
|
595
794
|
*
|
|
596
795
|
* @param params - Parameters for request
|
|
597
796
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -691,6 +890,54 @@ export namespace smartdevicemanagement_v1 {
|
|
|
691
890
|
|
|
692
891
|
/**
|
|
693
892
|
* Lists structures managed by the enterprise.
|
|
893
|
+
* @example
|
|
894
|
+
* ```js
|
|
895
|
+
* // Before running the sample:
|
|
896
|
+
* // - Enable the API at:
|
|
897
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
898
|
+
* // - Login into gcloud by running:
|
|
899
|
+
* // ```sh
|
|
900
|
+
* // $ gcloud auth application-default login
|
|
901
|
+
* // ```
|
|
902
|
+
* // - Install the npm module by running:
|
|
903
|
+
* // ```sh
|
|
904
|
+
* // $ npm install googleapis
|
|
905
|
+
* // ```
|
|
906
|
+
*
|
|
907
|
+
* const {google} = require('googleapis');
|
|
908
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
909
|
+
*
|
|
910
|
+
* async function main() {
|
|
911
|
+
* const auth = new google.auth.GoogleAuth({
|
|
912
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
913
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
914
|
+
* });
|
|
915
|
+
*
|
|
916
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
917
|
+
* const authClient = await auth.getClient();
|
|
918
|
+
* google.options({auth: authClient});
|
|
919
|
+
*
|
|
920
|
+
* // Do the magic
|
|
921
|
+
* const res = await smartdevicemanagement.enterprises.structures.list({
|
|
922
|
+
* // Optional filter to list structures.
|
|
923
|
+
* filter: 'placeholder-value',
|
|
924
|
+
* // The parent enterprise to list structures under. E.g. "enterprises/XYZ".
|
|
925
|
+
* parent: 'enterprises/my-enterprise',
|
|
926
|
+
* });
|
|
927
|
+
* console.log(res.data);
|
|
928
|
+
*
|
|
929
|
+
* // Example response
|
|
930
|
+
* // {
|
|
931
|
+
* // "structures": []
|
|
932
|
+
* // }
|
|
933
|
+
* }
|
|
934
|
+
*
|
|
935
|
+
* main().catch(e => {
|
|
936
|
+
* console.error(e);
|
|
937
|
+
* throw e;
|
|
938
|
+
* });
|
|
939
|
+
*
|
|
940
|
+
* ```
|
|
694
941
|
*
|
|
695
942
|
* @param params - Parameters for request
|
|
696
943
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -819,6 +1066,53 @@ export namespace smartdevicemanagement_v1 {
|
|
|
819
1066
|
|
|
820
1067
|
/**
|
|
821
1068
|
* Gets a room managed by the enterprise.
|
|
1069
|
+
* @example
|
|
1070
|
+
* ```js
|
|
1071
|
+
* // Before running the sample:
|
|
1072
|
+
* // - Enable the API at:
|
|
1073
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
1074
|
+
* // - Login into gcloud by running:
|
|
1075
|
+
* // ```sh
|
|
1076
|
+
* // $ gcloud auth application-default login
|
|
1077
|
+
* // ```
|
|
1078
|
+
* // - Install the npm module by running:
|
|
1079
|
+
* // ```sh
|
|
1080
|
+
* // $ npm install googleapis
|
|
1081
|
+
* // ```
|
|
1082
|
+
*
|
|
1083
|
+
* const {google} = require('googleapis');
|
|
1084
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
1085
|
+
*
|
|
1086
|
+
* async function main() {
|
|
1087
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1088
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1089
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
1090
|
+
* });
|
|
1091
|
+
*
|
|
1092
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1093
|
+
* const authClient = await auth.getClient();
|
|
1094
|
+
* google.options({auth: authClient});
|
|
1095
|
+
*
|
|
1096
|
+
* // Do the magic
|
|
1097
|
+
* const res = await smartdevicemanagement.enterprises.structures.rooms.get({
|
|
1098
|
+
* // The name of the room requested. For example: "enterprises/XYZ/structures/ABC/rooms/123".
|
|
1099
|
+
* name: 'enterprises/my-enterprise/structures/my-structure/rooms/my-room',
|
|
1100
|
+
* });
|
|
1101
|
+
* console.log(res.data);
|
|
1102
|
+
*
|
|
1103
|
+
* // Example response
|
|
1104
|
+
* // {
|
|
1105
|
+
* // "name": "my_name",
|
|
1106
|
+
* // "traits": {}
|
|
1107
|
+
* // }
|
|
1108
|
+
* }
|
|
1109
|
+
*
|
|
1110
|
+
* main().catch(e => {
|
|
1111
|
+
* console.error(e);
|
|
1112
|
+
* throw e;
|
|
1113
|
+
* });
|
|
1114
|
+
*
|
|
1115
|
+
* ```
|
|
822
1116
|
*
|
|
823
1117
|
* @param params - Parameters for request
|
|
824
1118
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -914,6 +1208,52 @@ export namespace smartdevicemanagement_v1 {
|
|
|
914
1208
|
|
|
915
1209
|
/**
|
|
916
1210
|
* Lists rooms managed by the enterprise.
|
|
1211
|
+
* @example
|
|
1212
|
+
* ```js
|
|
1213
|
+
* // Before running the sample:
|
|
1214
|
+
* // - Enable the API at:
|
|
1215
|
+
* // https://console.developers.google.com/apis/api/smartdevicemanagement.googleapis.com
|
|
1216
|
+
* // - Login into gcloud by running:
|
|
1217
|
+
* // ```sh
|
|
1218
|
+
* // $ gcloud auth application-default login
|
|
1219
|
+
* // ```
|
|
1220
|
+
* // - Install the npm module by running:
|
|
1221
|
+
* // ```sh
|
|
1222
|
+
* // $ npm install googleapis
|
|
1223
|
+
* // ```
|
|
1224
|
+
*
|
|
1225
|
+
* const {google} = require('googleapis');
|
|
1226
|
+
* const smartdevicemanagement = google.smartdevicemanagement('v1');
|
|
1227
|
+
*
|
|
1228
|
+
* async function main() {
|
|
1229
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1230
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1231
|
+
* scopes: ['https://www.googleapis.com/auth/sdm.service'],
|
|
1232
|
+
* });
|
|
1233
|
+
*
|
|
1234
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1235
|
+
* const authClient = await auth.getClient();
|
|
1236
|
+
* google.options({auth: authClient});
|
|
1237
|
+
*
|
|
1238
|
+
* // Do the magic
|
|
1239
|
+
* const res = await smartdevicemanagement.enterprises.structures.rooms.list({
|
|
1240
|
+
* // The parent resource name of the rooms requested. For example: "enterprises/XYZ/structures/ABC".
|
|
1241
|
+
* parent: 'enterprises/my-enterprise/structures/my-structure',
|
|
1242
|
+
* });
|
|
1243
|
+
* console.log(res.data);
|
|
1244
|
+
*
|
|
1245
|
+
* // Example response
|
|
1246
|
+
* // {
|
|
1247
|
+
* // "rooms": []
|
|
1248
|
+
* // }
|
|
1249
|
+
* }
|
|
1250
|
+
*
|
|
1251
|
+
* main().catch(e => {
|
|
1252
|
+
* console.error(e);
|
|
1253
|
+
* throw e;
|
|
1254
|
+
* });
|
|
1255
|
+
*
|
|
1256
|
+
* ```
|
|
917
1257
|
*
|
|
918
1258
|
* @param params - Parameters for request
|
|
919
1259
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|