@googleapis/chromemanagement 1.1.0

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/v1.ts ADDED
@@ -0,0 +1,1754 @@
1
+ // Copyright 2020 Google LLC
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ /* eslint-disable @typescript-eslint/no-explicit-any */
15
+ /* eslint-disable @typescript-eslint/class-name-casing */
16
+ /* eslint-disable @typescript-eslint/no-unused-vars */
17
+ /* eslint-disable @typescript-eslint/no-empty-interface */
18
+ /* eslint-disable @typescript-eslint/no-namespace */
19
+ /* eslint-disable no-irregular-whitespace */
20
+
21
+ import {
22
+ OAuth2Client,
23
+ JWT,
24
+ Compute,
25
+ UserRefreshClient,
26
+ BaseExternalAccountClient,
27
+ GaxiosPromise,
28
+ GoogleConfigurable,
29
+ createAPIRequest,
30
+ MethodOptions,
31
+ StreamMethodOptions,
32
+ GlobalOptions,
33
+ GoogleAuth,
34
+ BodyResponseCallback,
35
+ APIRequestContext,
36
+ } from 'googleapis-common';
37
+ import {Readable} from 'stream';
38
+
39
+ export namespace chromemanagement_v1 {
40
+ export interface Options extends GlobalOptions {
41
+ version: 'v1';
42
+ }
43
+
44
+ interface StandardParameters {
45
+ /**
46
+ * Auth client or API Key for the request
47
+ */
48
+ auth?:
49
+ | string
50
+ | OAuth2Client
51
+ | JWT
52
+ | Compute
53
+ | UserRefreshClient
54
+ | BaseExternalAccountClient
55
+ | GoogleAuth;
56
+
57
+ /**
58
+ * V1 error format.
59
+ */
60
+ '$.xgafv'?: string;
61
+ /**
62
+ * OAuth access token.
63
+ */
64
+ access_token?: string;
65
+ /**
66
+ * Data format for response.
67
+ */
68
+ alt?: string;
69
+ /**
70
+ * JSONP
71
+ */
72
+ callback?: string;
73
+ /**
74
+ * Selector specifying which fields to include in a partial response.
75
+ */
76
+ fields?: string;
77
+ /**
78
+ * 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.
79
+ */
80
+ key?: string;
81
+ /**
82
+ * OAuth 2.0 token for the current user.
83
+ */
84
+ oauth_token?: string;
85
+ /**
86
+ * Returns response with indentations and line breaks.
87
+ */
88
+ prettyPrint?: boolean;
89
+ /**
90
+ * 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.
91
+ */
92
+ quotaUser?: string;
93
+ /**
94
+ * Legacy upload protocol for media (e.g. "media", "multipart").
95
+ */
96
+ uploadType?: string;
97
+ /**
98
+ * Upload protocol for media (e.g. "raw", "multipart").
99
+ */
100
+ upload_protocol?: string;
101
+ }
102
+
103
+ /**
104
+ * Chrome Management API
105
+ *
106
+ * The Chrome Management API is a suite of services that allows Chrome administrators to view, manage and gain insights on their Chrome OS and Chrome Browser devices.
107
+ *
108
+ * @example
109
+ * ```js
110
+ * const {google} = require('googleapis');
111
+ * const chromemanagement = google.chromemanagement('v1');
112
+ * ```
113
+ */
114
+ export class Chromemanagement {
115
+ context: APIRequestContext;
116
+ customers: Resource$Customers;
117
+
118
+ constructor(options: GlobalOptions, google?: GoogleConfigurable) {
119
+ this.context = {
120
+ _options: options || {},
121
+ google,
122
+ };
123
+
124
+ this.customers = new Resource$Customers(this.context);
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Android app information.
130
+ */
131
+ export interface Schema$GoogleChromeManagementV1AndroidAppInfo {
132
+ /**
133
+ * Output only. Permissions requested by an Android app.
134
+ */
135
+ permissions?: Schema$GoogleChromeManagementV1AndroidAppPermission[];
136
+ }
137
+ /**
138
+ * Permission requested by an Android app.
139
+ */
140
+ export interface Schema$GoogleChromeManagementV1AndroidAppPermission {
141
+ /**
142
+ * Output only. The type of the permission.
143
+ */
144
+ type?: string | null;
145
+ }
146
+ /**
147
+ * Resource representing app details.
148
+ */
149
+ export interface Schema$GoogleChromeManagementV1AppDetails {
150
+ /**
151
+ * Output only. Android app information.
152
+ */
153
+ androidAppInfo?: Schema$GoogleChromeManagementV1AndroidAppInfo;
154
+ /**
155
+ * Output only. Unique store identifier for the item. Examples: "gmbmikajjgmnabiglmofipeabaddhgne" for the Save to Google Drive Chrome extension, "com.google.android.apps.docs" for the Google Drive Android app.
156
+ */
157
+ appId?: string | null;
158
+ /**
159
+ * Output only. Chrome Web Store app information.
160
+ */
161
+ chromeAppInfo?: Schema$GoogleChromeManagementV1ChromeAppInfo;
162
+ /**
163
+ * Output only. App's description.
164
+ */
165
+ description?: string | null;
166
+ /**
167
+ * Output only. The uri for the detail page of the item.
168
+ */
169
+ detailUri?: string | null;
170
+ /**
171
+ * Output only. App's display name.
172
+ */
173
+ displayName?: string | null;
174
+ /**
175
+ * Output only. First published time.
176
+ */
177
+ firstPublishTime?: string | null;
178
+ /**
179
+ * Output only. Home page or Website uri.
180
+ */
181
+ homepageUri?: string | null;
182
+ /**
183
+ * Output only. A link to an image that can be used as an icon for the product.
184
+ */
185
+ iconUri?: string | null;
186
+ /**
187
+ * Output only. Indicates if the app has to be paid for OR has paid content.
188
+ */
189
+ isPaidApp?: boolean | null;
190
+ /**
191
+ * Output only. Latest published time.
192
+ */
193
+ latestPublishTime?: string | null;
194
+ /**
195
+ * Output only. Format: name=customers/{customer_id\}/apps/{chrome|android|web\}/{app_id\}@{version\}
196
+ */
197
+ name?: string | null;
198
+ /**
199
+ * Output only. The URI pointing to the privacy policy of the app, if it was provided by the developer. Version-specific field that will only be set when the requested app version is found.
200
+ */
201
+ privacyPolicyUri?: string | null;
202
+ /**
203
+ * Output only. The publisher of the item.
204
+ */
205
+ publisher?: string | null;
206
+ /**
207
+ * Output only. Number of reviews received. Chrome Web Store review information will always be for the latest version of an app.
208
+ */
209
+ reviewNumber?: string | null;
210
+ /**
211
+ * Output only. The rating of the app (on 5 stars). Chrome Web Store review information will always be for the latest version of an app.
212
+ */
213
+ reviewRating?: number | null;
214
+ /**
215
+ * Output only. App version. A new revision is committed whenever a new version of the app is published.
216
+ */
217
+ revisionId?: string | null;
218
+ /**
219
+ * Output only. Information about a partial service error if applicable.
220
+ */
221
+ serviceError?: Schema$GoogleRpcStatus;
222
+ /**
223
+ * Output only. App type.
224
+ */
225
+ type?: string | null;
226
+ }
227
+ /**
228
+ * Describes a browser version and its install count.
229
+ */
230
+ export interface Schema$GoogleChromeManagementV1BrowserVersion {
231
+ /**
232
+ * Output only. The release channel of the installed browser.
233
+ */
234
+ channel?: string | null;
235
+ /**
236
+ * Output only. Count grouped by device_system and major version
237
+ */
238
+ count?: string | null;
239
+ /**
240
+ * Output only. Version of the system-specified operating system.
241
+ */
242
+ deviceOsVersion?: string | null;
243
+ /**
244
+ * Output only. The device operating system.
245
+ */
246
+ system?: string | null;
247
+ /**
248
+ * Output only. The full version of the installed browser.
249
+ */
250
+ version?: string | null;
251
+ }
252
+ /**
253
+ * Chrome Web Store app information.
254
+ */
255
+ export interface Schema$GoogleChromeManagementV1ChromeAppInfo {
256
+ /**
257
+ * Output only. Whether the app or extension is built and maintained by Google. Version-specific field that will only be set when the requested app version is found.
258
+ */
259
+ googleOwned?: boolean | null;
260
+ /**
261
+ * Output only. Whether the app or extension is in a published state in the Chrome Web Store.
262
+ */
263
+ isCwsHosted?: boolean | null;
264
+ /**
265
+ * Output only. Whether the app or extension is a theme.
266
+ */
267
+ isTheme?: boolean | null;
268
+ /**
269
+ * Output only. The minimum number of users using this app.
270
+ */
271
+ minUserCount?: number | null;
272
+ /**
273
+ * Output only. Every custom permission requested by the app. Version-specific field that will only be set when the requested app version is found.
274
+ */
275
+ permissions?: Schema$GoogleChromeManagementV1ChromeAppPermission[];
276
+ /**
277
+ * Output only. Every permission giving access to domains or broad host patterns. ( e.g. www.google.com). This includes the matches from content scripts as well as hosts in the permissions node of the manifest. Version-specific field that will only be set when the requested app version is found.
278
+ */
279
+ siteAccess?: Schema$GoogleChromeManagementV1ChromeAppSiteAccess[];
280
+ /**
281
+ * Output only. The app developer has enabled support for their app. Version-specific field that will only be set when the requested app version is found.
282
+ */
283
+ supportEnabled?: boolean | null;
284
+ }
285
+ /**
286
+ * Permission requested by a Chrome app or extension.
287
+ */
288
+ export interface Schema$GoogleChromeManagementV1ChromeAppPermission {
289
+ /**
290
+ * Output only. If available, whether this permissions grants the app/extension access to user data.
291
+ */
292
+ accessUserData?: boolean | null;
293
+ /**
294
+ * Output only. If available, a URI to a page that has documentation for the current permission.
295
+ */
296
+ documentationUri?: string | null;
297
+ /**
298
+ * Output only. The type of the permission.
299
+ */
300
+ type?: string | null;
301
+ }
302
+ /**
303
+ * Details of an app installation request.
304
+ */
305
+ export interface Schema$GoogleChromeManagementV1ChromeAppRequest {
306
+ /**
307
+ * Output only. Format: app_details=customers/{customer_id\}/apps/chrome/{app_id\}
308
+ */
309
+ appDetails?: string | null;
310
+ /**
311
+ * Output only. Unique store identifier for the app. Example: "gmbmikajjgmnabiglmofipeabaddhgne" for the Save to Google Drive Chrome extension.
312
+ */
313
+ appId?: string | null;
314
+ /**
315
+ * Output only. The uri for the detail page of the item.
316
+ */
317
+ detailUri?: string | null;
318
+ /**
319
+ * Output only. App's display name.
320
+ */
321
+ displayName?: string | null;
322
+ /**
323
+ * Output only. A link to an image that can be used as an icon for the product.
324
+ */
325
+ iconUri?: string | null;
326
+ /**
327
+ * Output only. The timestamp of the most recently made request for this app.
328
+ */
329
+ latestRequestTime?: string | null;
330
+ /**
331
+ * Output only. Total count of requests for this app.
332
+ */
333
+ requestCount?: string | null;
334
+ }
335
+ /**
336
+ * Represent one host permission.
337
+ */
338
+ export interface Schema$GoogleChromeManagementV1ChromeAppSiteAccess {
339
+ /**
340
+ * Output only. This can contain very specific hosts, or patterns like "*.com" for instance.
341
+ */
342
+ hostMatch?: string | null;
343
+ }
344
+ /**
345
+ * Response containing summary of requested app installations.
346
+ */
347
+ export interface Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse {
348
+ /**
349
+ * Token to specify the next page in the list.
350
+ */
351
+ nextPageToken?: string | null;
352
+ /**
353
+ * Count of requested apps matching request.
354
+ */
355
+ requestedApps?: Schema$GoogleChromeManagementV1ChromeAppRequest[];
356
+ /**
357
+ * Total number of matching app requests.
358
+ */
359
+ totalSize?: number | null;
360
+ }
361
+ /**
362
+ * Response containing requested browser versions details and counts.
363
+ */
364
+ export interface Schema$GoogleChromeManagementV1CountChromeVersionsResponse {
365
+ /**
366
+ * List of all browser versions and their install counts.
367
+ */
368
+ browserVersions?: Schema$GoogleChromeManagementV1BrowserVersion[];
369
+ /**
370
+ * Token to specify the next page of the request.
371
+ */
372
+ nextPageToken?: string | null;
373
+ /**
374
+ * Total number browser versions matching request.
375
+ */
376
+ totalSize?: number | null;
377
+ }
378
+ /**
379
+ * Response containing details of queried installed apps.
380
+ */
381
+ export interface Schema$GoogleChromeManagementV1CountInstalledAppsResponse {
382
+ /**
383
+ * List of installed apps matching request.
384
+ */
385
+ installedApps?: Schema$GoogleChromeManagementV1InstalledApp[];
386
+ /**
387
+ * Token to specify the next page of the request.
388
+ */
389
+ nextPageToken?: string | null;
390
+ /**
391
+ * Total number of installed apps matching request.
392
+ */
393
+ totalSize?: number | null;
394
+ }
395
+ /**
396
+ * Describes a device reporting Chrome browser information.
397
+ */
398
+ export interface Schema$GoogleChromeManagementV1Device {
399
+ /**
400
+ * Output only. The ID of the device that reported this Chrome browser information.
401
+ */
402
+ deviceId?: string | null;
403
+ /**
404
+ * Output only. The name of the machine within its local network.
405
+ */
406
+ machine?: string | null;
407
+ }
408
+ /**
409
+ * Response containing a list of devices with queried app installed.
410
+ */
411
+ export interface Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse {
412
+ /**
413
+ * A list of devices which have the app installed. Sorted in ascending alphabetical order on the Device.machine field.
414
+ */
415
+ devices?: Schema$GoogleChromeManagementV1Device[];
416
+ /**
417
+ * Token to specify the next page of the request.
418
+ */
419
+ nextPageToken?: string | null;
420
+ /**
421
+ * Total number of devices matching request.
422
+ */
423
+ totalSize?: number | null;
424
+ }
425
+ /**
426
+ * Describes an installed app.
427
+ */
428
+ export interface Schema$GoogleChromeManagementV1InstalledApp {
429
+ /**
430
+ * Output only. Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).
431
+ */
432
+ appId?: string | null;
433
+ /**
434
+ * Output only. How the app was installed.
435
+ */
436
+ appInstallType?: string | null;
437
+ /**
438
+ * Output only. Source of the installed app.
439
+ */
440
+ appSource?: string | null;
441
+ /**
442
+ * Output only. Type of the app.
443
+ */
444
+ appType?: string | null;
445
+ /**
446
+ * Output only. Count of browser devices with this app installed.
447
+ */
448
+ browserDeviceCount?: string | null;
449
+ /**
450
+ * Output only. Description of the installed app.
451
+ */
452
+ description?: string | null;
453
+ /**
454
+ * Output only. Whether the app is disabled.
455
+ */
456
+ disabled?: boolean | null;
457
+ /**
458
+ * Output only. Name of the installed app.
459
+ */
460
+ displayName?: string | null;
461
+ /**
462
+ * Output only. Homepage uri of the installed app.
463
+ */
464
+ homepageUri?: string | null;
465
+ /**
466
+ * Output only. Count of ChromeOS users with this app installed.
467
+ */
468
+ osUserCount?: string | null;
469
+ /**
470
+ * Output only. Permissions of the installed app.
471
+ */
472
+ permissions?: string[] | null;
473
+ }
474
+ /**
475
+ * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
476
+ */
477
+ export interface Schema$GoogleRpcStatus {
478
+ /**
479
+ * The status code, which should be an enum value of google.rpc.Code.
480
+ */
481
+ code?: number | null;
482
+ /**
483
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
484
+ */
485
+ details?: Array<{[key: string]: any}> | null;
486
+ /**
487
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
488
+ */
489
+ message?: string | null;
490
+ }
491
+
492
+ export class Resource$Customers {
493
+ context: APIRequestContext;
494
+ apps: Resource$Customers$Apps;
495
+ reports: Resource$Customers$Reports;
496
+ constructor(context: APIRequestContext) {
497
+ this.context = context;
498
+ this.apps = new Resource$Customers$Apps(this.context);
499
+ this.reports = new Resource$Customers$Reports(this.context);
500
+ }
501
+ }
502
+
503
+ export class Resource$Customers$Apps {
504
+ context: APIRequestContext;
505
+ android: Resource$Customers$Apps$Android;
506
+ chrome: Resource$Customers$Apps$Chrome;
507
+ web: Resource$Customers$Apps$Web;
508
+ constructor(context: APIRequestContext) {
509
+ this.context = context;
510
+ this.android = new Resource$Customers$Apps$Android(this.context);
511
+ this.chrome = new Resource$Customers$Apps$Chrome(this.context);
512
+ this.web = new Resource$Customers$Apps$Web(this.context);
513
+ }
514
+
515
+ /**
516
+ * Generate summary of app installation requests.
517
+ * @example
518
+ * ```js
519
+ * // Before running the sample:
520
+ * // - Enable the API at:
521
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
522
+ * // - Login into gcloud by running:
523
+ * // `$ gcloud auth application-default login`
524
+ * // - Install the npm module by running:
525
+ * // `$ npm install googleapis`
526
+ *
527
+ * const {google} = require('googleapis');
528
+ * const chromemanagement = google.chromemanagement('v1');
529
+ *
530
+ * async function main() {
531
+ * const auth = new google.auth.GoogleAuth({
532
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
533
+ * scopes: [
534
+ * 'https://www.googleapis.com/auth/chrome.management.appdetails.readonly',
535
+ * ],
536
+ * });
537
+ *
538
+ * // Acquire an auth client, and bind it to all future calls
539
+ * const authClient = await auth.getClient();
540
+ * google.options({auth: authClient});
541
+ *
542
+ * // Do the magic
543
+ * const res = await chromemanagement.customers.apps.countChromeAppRequests({
544
+ * // Required. Customer id or "my_customer" to use the customer associated to the account making the request.
545
+ * customer: 'customers/my-customer',
546
+ * // Field used to order results. Supported fields: * request_count * latest_request_time
547
+ * orderBy: 'placeholder-value',
548
+ * // The ID of the organizational unit.
549
+ * orgUnitId: 'placeholder-value',
550
+ * // Maximum number of results to return. Maximum and default are 50, anything above will be coerced to 50.
551
+ * pageSize: 'placeholder-value',
552
+ * // Token to specify the page of the request to be returned.
553
+ * pageToken: 'placeholder-value',
554
+ * });
555
+ * console.log(res.data);
556
+ *
557
+ * // Example response
558
+ * // {
559
+ * // "nextPageToken": "my_nextPageToken",
560
+ * // "requestedApps": [],
561
+ * // "totalSize": 0
562
+ * // }
563
+ * }
564
+ *
565
+ * main().catch(e => {
566
+ * console.error(e);
567
+ * throw e;
568
+ * });
569
+ *
570
+ * ```
571
+ *
572
+ * @param params - Parameters for request
573
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
574
+ * @param callback - Optional callback that handles the response.
575
+ * @returns A promise if used with async/await, or void if used with a callback.
576
+ */
577
+ countChromeAppRequests(
578
+ params: Params$Resource$Customers$Apps$Countchromeapprequests,
579
+ options: StreamMethodOptions
580
+ ): GaxiosPromise<Readable>;
581
+ countChromeAppRequests(
582
+ params?: Params$Resource$Customers$Apps$Countchromeapprequests,
583
+ options?: MethodOptions
584
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>;
585
+ countChromeAppRequests(
586
+ params: Params$Resource$Customers$Apps$Countchromeapprequests,
587
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
588
+ callback: BodyResponseCallback<Readable>
589
+ ): void;
590
+ countChromeAppRequests(
591
+ params: Params$Resource$Customers$Apps$Countchromeapprequests,
592
+ options:
593
+ | MethodOptions
594
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>,
595
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
596
+ ): void;
597
+ countChromeAppRequests(
598
+ params: Params$Resource$Customers$Apps$Countchromeapprequests,
599
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
600
+ ): void;
601
+ countChromeAppRequests(
602
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
603
+ ): void;
604
+ countChromeAppRequests(
605
+ paramsOrCallback?:
606
+ | Params$Resource$Customers$Apps$Countchromeapprequests
607
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
608
+ | BodyResponseCallback<Readable>,
609
+ optionsOrCallback?:
610
+ | MethodOptions
611
+ | StreamMethodOptions
612
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
613
+ | BodyResponseCallback<Readable>,
614
+ callback?:
615
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
616
+ | BodyResponseCallback<Readable>
617
+ ):
618
+ | void
619
+ | GaxiosPromise<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>
620
+ | GaxiosPromise<Readable> {
621
+ let params = (paramsOrCallback ||
622
+ {}) as Params$Resource$Customers$Apps$Countchromeapprequests;
623
+ let options = (optionsOrCallback || {}) as MethodOptions;
624
+
625
+ if (typeof paramsOrCallback === 'function') {
626
+ callback = paramsOrCallback;
627
+ params = {} as Params$Resource$Customers$Apps$Countchromeapprequests;
628
+ options = {};
629
+ }
630
+
631
+ if (typeof optionsOrCallback === 'function') {
632
+ callback = optionsOrCallback;
633
+ options = {};
634
+ }
635
+
636
+ const rootUrl =
637
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
638
+ const parameters = {
639
+ options: Object.assign(
640
+ {
641
+ url: (
642
+ rootUrl + '/v1/{+customer}/apps:countChromeAppRequests'
643
+ ).replace(/([^:]\/)\/+/g, '$1'),
644
+ method: 'GET',
645
+ },
646
+ options
647
+ ),
648
+ params,
649
+ requiredParams: ['customer'],
650
+ pathParams: ['customer'],
651
+ context: this.context,
652
+ };
653
+ if (callback) {
654
+ createAPIRequest<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>(
655
+ parameters,
656
+ callback as BodyResponseCallback<unknown>
657
+ );
658
+ } else {
659
+ return createAPIRequest<Schema$GoogleChromeManagementV1CountChromeAppRequestsResponse>(
660
+ parameters
661
+ );
662
+ }
663
+ }
664
+ }
665
+
666
+ export interface Params$Resource$Customers$Apps$Countchromeapprequests
667
+ extends StandardParameters {
668
+ /**
669
+ * Required. Customer id or "my_customer" to use the customer associated to the account making the request.
670
+ */
671
+ customer?: string;
672
+ /**
673
+ * Field used to order results. Supported fields: * request_count * latest_request_time
674
+ */
675
+ orderBy?: string;
676
+ /**
677
+ * The ID of the organizational unit.
678
+ */
679
+ orgUnitId?: string;
680
+ /**
681
+ * Maximum number of results to return. Maximum and default are 50, anything above will be coerced to 50.
682
+ */
683
+ pageSize?: number;
684
+ /**
685
+ * Token to specify the page of the request to be returned.
686
+ */
687
+ pageToken?: string;
688
+ }
689
+
690
+ export class Resource$Customers$Apps$Android {
691
+ context: APIRequestContext;
692
+ constructor(context: APIRequestContext) {
693
+ this.context = context;
694
+ }
695
+
696
+ /**
697
+ * Get a specific app for a customer by its resource name.
698
+ * @example
699
+ * ```js
700
+ * // Before running the sample:
701
+ * // - Enable the API at:
702
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
703
+ * // - Login into gcloud by running:
704
+ * // `$ gcloud auth application-default login`
705
+ * // - Install the npm module by running:
706
+ * // `$ npm install googleapis`
707
+ *
708
+ * const {google} = require('googleapis');
709
+ * const chromemanagement = google.chromemanagement('v1');
710
+ *
711
+ * async function main() {
712
+ * const auth = new google.auth.GoogleAuth({
713
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
714
+ * scopes: [
715
+ * 'https://www.googleapis.com/auth/chrome.management.appdetails.readonly',
716
+ * ],
717
+ * });
718
+ *
719
+ * // Acquire an auth client, and bind it to all future calls
720
+ * const authClient = await auth.getClient();
721
+ * google.options({auth: authClient});
722
+ *
723
+ * // Do the magic
724
+ * const res = await chromemanagement.customers.apps.android.get({
725
+ * // Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
726
+ * name: 'customers/my-customer/apps/android/[^/]+',
727
+ * });
728
+ * console.log(res.data);
729
+ *
730
+ * // Example response
731
+ * // {
732
+ * // "androidAppInfo": {},
733
+ * // "appId": "my_appId",
734
+ * // "chromeAppInfo": {},
735
+ * // "description": "my_description",
736
+ * // "detailUri": "my_detailUri",
737
+ * // "displayName": "my_displayName",
738
+ * // "firstPublishTime": "my_firstPublishTime",
739
+ * // "homepageUri": "my_homepageUri",
740
+ * // "iconUri": "my_iconUri",
741
+ * // "isPaidApp": false,
742
+ * // "latestPublishTime": "my_latestPublishTime",
743
+ * // "name": "my_name",
744
+ * // "privacyPolicyUri": "my_privacyPolicyUri",
745
+ * // "publisher": "my_publisher",
746
+ * // "reviewNumber": "my_reviewNumber",
747
+ * // "reviewRating": {},
748
+ * // "revisionId": "my_revisionId",
749
+ * // "serviceError": {},
750
+ * // "type": "my_type"
751
+ * // }
752
+ * }
753
+ *
754
+ * main().catch(e => {
755
+ * console.error(e);
756
+ * throw e;
757
+ * });
758
+ *
759
+ * ```
760
+ *
761
+ * @param params - Parameters for request
762
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
763
+ * @param callback - Optional callback that handles the response.
764
+ * @returns A promise if used with async/await, or void if used with a callback.
765
+ */
766
+ get(
767
+ params: Params$Resource$Customers$Apps$Android$Get,
768
+ options: StreamMethodOptions
769
+ ): GaxiosPromise<Readable>;
770
+ get(
771
+ params?: Params$Resource$Customers$Apps$Android$Get,
772
+ options?: MethodOptions
773
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>;
774
+ get(
775
+ params: Params$Resource$Customers$Apps$Android$Get,
776
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
777
+ callback: BodyResponseCallback<Readable>
778
+ ): void;
779
+ get(
780
+ params: Params$Resource$Customers$Apps$Android$Get,
781
+ options:
782
+ | MethodOptions
783
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>,
784
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
785
+ ): void;
786
+ get(
787
+ params: Params$Resource$Customers$Apps$Android$Get,
788
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
789
+ ): void;
790
+ get(
791
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
792
+ ): void;
793
+ get(
794
+ paramsOrCallback?:
795
+ | Params$Resource$Customers$Apps$Android$Get
796
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
797
+ | BodyResponseCallback<Readable>,
798
+ optionsOrCallback?:
799
+ | MethodOptions
800
+ | StreamMethodOptions
801
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
802
+ | BodyResponseCallback<Readable>,
803
+ callback?:
804
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
805
+ | BodyResponseCallback<Readable>
806
+ ):
807
+ | void
808
+ | GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>
809
+ | GaxiosPromise<Readable> {
810
+ let params = (paramsOrCallback ||
811
+ {}) as Params$Resource$Customers$Apps$Android$Get;
812
+ let options = (optionsOrCallback || {}) as MethodOptions;
813
+
814
+ if (typeof paramsOrCallback === 'function') {
815
+ callback = paramsOrCallback;
816
+ params = {} as Params$Resource$Customers$Apps$Android$Get;
817
+ options = {};
818
+ }
819
+
820
+ if (typeof optionsOrCallback === 'function') {
821
+ callback = optionsOrCallback;
822
+ options = {};
823
+ }
824
+
825
+ const rootUrl =
826
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
827
+ const parameters = {
828
+ options: Object.assign(
829
+ {
830
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
831
+ method: 'GET',
832
+ },
833
+ options
834
+ ),
835
+ params,
836
+ requiredParams: ['name'],
837
+ pathParams: ['name'],
838
+ context: this.context,
839
+ };
840
+ if (callback) {
841
+ createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
842
+ parameters,
843
+ callback as BodyResponseCallback<unknown>
844
+ );
845
+ } else {
846
+ return createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
847
+ parameters
848
+ );
849
+ }
850
+ }
851
+ }
852
+
853
+ export interface Params$Resource$Customers$Apps$Android$Get
854
+ extends StandardParameters {
855
+ /**
856
+ * Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
857
+ */
858
+ name?: string;
859
+ }
860
+
861
+ export class Resource$Customers$Apps$Chrome {
862
+ context: APIRequestContext;
863
+ constructor(context: APIRequestContext) {
864
+ this.context = context;
865
+ }
866
+
867
+ /**
868
+ * Get a specific app for a customer by its resource name.
869
+ * @example
870
+ * ```js
871
+ * // Before running the sample:
872
+ * // - Enable the API at:
873
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
874
+ * // - Login into gcloud by running:
875
+ * // `$ gcloud auth application-default login`
876
+ * // - Install the npm module by running:
877
+ * // `$ npm install googleapis`
878
+ *
879
+ * const {google} = require('googleapis');
880
+ * const chromemanagement = google.chromemanagement('v1');
881
+ *
882
+ * async function main() {
883
+ * const auth = new google.auth.GoogleAuth({
884
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
885
+ * scopes: [
886
+ * 'https://www.googleapis.com/auth/chrome.management.appdetails.readonly',
887
+ * ],
888
+ * });
889
+ *
890
+ * // Acquire an auth client, and bind it to all future calls
891
+ * const authClient = await auth.getClient();
892
+ * google.options({auth: authClient});
893
+ *
894
+ * // Do the magic
895
+ * const res = await chromemanagement.customers.apps.chrome.get({
896
+ * // Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
897
+ * name: 'customers/my-customer/apps/chrome/[^/]+',
898
+ * });
899
+ * console.log(res.data);
900
+ *
901
+ * // Example response
902
+ * // {
903
+ * // "androidAppInfo": {},
904
+ * // "appId": "my_appId",
905
+ * // "chromeAppInfo": {},
906
+ * // "description": "my_description",
907
+ * // "detailUri": "my_detailUri",
908
+ * // "displayName": "my_displayName",
909
+ * // "firstPublishTime": "my_firstPublishTime",
910
+ * // "homepageUri": "my_homepageUri",
911
+ * // "iconUri": "my_iconUri",
912
+ * // "isPaidApp": false,
913
+ * // "latestPublishTime": "my_latestPublishTime",
914
+ * // "name": "my_name",
915
+ * // "privacyPolicyUri": "my_privacyPolicyUri",
916
+ * // "publisher": "my_publisher",
917
+ * // "reviewNumber": "my_reviewNumber",
918
+ * // "reviewRating": {},
919
+ * // "revisionId": "my_revisionId",
920
+ * // "serviceError": {},
921
+ * // "type": "my_type"
922
+ * // }
923
+ * }
924
+ *
925
+ * main().catch(e => {
926
+ * console.error(e);
927
+ * throw e;
928
+ * });
929
+ *
930
+ * ```
931
+ *
932
+ * @param params - Parameters for request
933
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
934
+ * @param callback - Optional callback that handles the response.
935
+ * @returns A promise if used with async/await, or void if used with a callback.
936
+ */
937
+ get(
938
+ params: Params$Resource$Customers$Apps$Chrome$Get,
939
+ options: StreamMethodOptions
940
+ ): GaxiosPromise<Readable>;
941
+ get(
942
+ params?: Params$Resource$Customers$Apps$Chrome$Get,
943
+ options?: MethodOptions
944
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>;
945
+ get(
946
+ params: Params$Resource$Customers$Apps$Chrome$Get,
947
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
948
+ callback: BodyResponseCallback<Readable>
949
+ ): void;
950
+ get(
951
+ params: Params$Resource$Customers$Apps$Chrome$Get,
952
+ options:
953
+ | MethodOptions
954
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>,
955
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
956
+ ): void;
957
+ get(
958
+ params: Params$Resource$Customers$Apps$Chrome$Get,
959
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
960
+ ): void;
961
+ get(
962
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
963
+ ): void;
964
+ get(
965
+ paramsOrCallback?:
966
+ | Params$Resource$Customers$Apps$Chrome$Get
967
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
968
+ | BodyResponseCallback<Readable>,
969
+ optionsOrCallback?:
970
+ | MethodOptions
971
+ | StreamMethodOptions
972
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
973
+ | BodyResponseCallback<Readable>,
974
+ callback?:
975
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
976
+ | BodyResponseCallback<Readable>
977
+ ):
978
+ | void
979
+ | GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>
980
+ | GaxiosPromise<Readable> {
981
+ let params = (paramsOrCallback ||
982
+ {}) as Params$Resource$Customers$Apps$Chrome$Get;
983
+ let options = (optionsOrCallback || {}) as MethodOptions;
984
+
985
+ if (typeof paramsOrCallback === 'function') {
986
+ callback = paramsOrCallback;
987
+ params = {} as Params$Resource$Customers$Apps$Chrome$Get;
988
+ options = {};
989
+ }
990
+
991
+ if (typeof optionsOrCallback === 'function') {
992
+ callback = optionsOrCallback;
993
+ options = {};
994
+ }
995
+
996
+ const rootUrl =
997
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
998
+ const parameters = {
999
+ options: Object.assign(
1000
+ {
1001
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1002
+ method: 'GET',
1003
+ },
1004
+ options
1005
+ ),
1006
+ params,
1007
+ requiredParams: ['name'],
1008
+ pathParams: ['name'],
1009
+ context: this.context,
1010
+ };
1011
+ if (callback) {
1012
+ createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
1013
+ parameters,
1014
+ callback as BodyResponseCallback<unknown>
1015
+ );
1016
+ } else {
1017
+ return createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
1018
+ parameters
1019
+ );
1020
+ }
1021
+ }
1022
+ }
1023
+
1024
+ export interface Params$Resource$Customers$Apps$Chrome$Get
1025
+ extends StandardParameters {
1026
+ /**
1027
+ * Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
1028
+ */
1029
+ name?: string;
1030
+ }
1031
+
1032
+ export class Resource$Customers$Apps$Web {
1033
+ context: APIRequestContext;
1034
+ constructor(context: APIRequestContext) {
1035
+ this.context = context;
1036
+ }
1037
+
1038
+ /**
1039
+ * Get a specific app for a customer by its resource name.
1040
+ * @example
1041
+ * ```js
1042
+ * // Before running the sample:
1043
+ * // - Enable the API at:
1044
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
1045
+ * // - Login into gcloud by running:
1046
+ * // `$ gcloud auth application-default login`
1047
+ * // - Install the npm module by running:
1048
+ * // `$ npm install googleapis`
1049
+ *
1050
+ * const {google} = require('googleapis');
1051
+ * const chromemanagement = google.chromemanagement('v1');
1052
+ *
1053
+ * async function main() {
1054
+ * const auth = new google.auth.GoogleAuth({
1055
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1056
+ * scopes: [
1057
+ * 'https://www.googleapis.com/auth/chrome.management.appdetails.readonly',
1058
+ * ],
1059
+ * });
1060
+ *
1061
+ * // Acquire an auth client, and bind it to all future calls
1062
+ * const authClient = await auth.getClient();
1063
+ * google.options({auth: authClient});
1064
+ *
1065
+ * // Do the magic
1066
+ * const res = await chromemanagement.customers.apps.web.get({
1067
+ * // Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
1068
+ * name: 'customers/my-customer/apps/web/[^/]+',
1069
+ * });
1070
+ * console.log(res.data);
1071
+ *
1072
+ * // Example response
1073
+ * // {
1074
+ * // "androidAppInfo": {},
1075
+ * // "appId": "my_appId",
1076
+ * // "chromeAppInfo": {},
1077
+ * // "description": "my_description",
1078
+ * // "detailUri": "my_detailUri",
1079
+ * // "displayName": "my_displayName",
1080
+ * // "firstPublishTime": "my_firstPublishTime",
1081
+ * // "homepageUri": "my_homepageUri",
1082
+ * // "iconUri": "my_iconUri",
1083
+ * // "isPaidApp": false,
1084
+ * // "latestPublishTime": "my_latestPublishTime",
1085
+ * // "name": "my_name",
1086
+ * // "privacyPolicyUri": "my_privacyPolicyUri",
1087
+ * // "publisher": "my_publisher",
1088
+ * // "reviewNumber": "my_reviewNumber",
1089
+ * // "reviewRating": {},
1090
+ * // "revisionId": "my_revisionId",
1091
+ * // "serviceError": {},
1092
+ * // "type": "my_type"
1093
+ * // }
1094
+ * }
1095
+ *
1096
+ * main().catch(e => {
1097
+ * console.error(e);
1098
+ * throw e;
1099
+ * });
1100
+ *
1101
+ * ```
1102
+ *
1103
+ * @param params - Parameters for request
1104
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1105
+ * @param callback - Optional callback that handles the response.
1106
+ * @returns A promise if used with async/await, or void if used with a callback.
1107
+ */
1108
+ get(
1109
+ params: Params$Resource$Customers$Apps$Web$Get,
1110
+ options: StreamMethodOptions
1111
+ ): GaxiosPromise<Readable>;
1112
+ get(
1113
+ params?: Params$Resource$Customers$Apps$Web$Get,
1114
+ options?: MethodOptions
1115
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>;
1116
+ get(
1117
+ params: Params$Resource$Customers$Apps$Web$Get,
1118
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1119
+ callback: BodyResponseCallback<Readable>
1120
+ ): void;
1121
+ get(
1122
+ params: Params$Resource$Customers$Apps$Web$Get,
1123
+ options:
1124
+ | MethodOptions
1125
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>,
1126
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1127
+ ): void;
1128
+ get(
1129
+ params: Params$Resource$Customers$Apps$Web$Get,
1130
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1131
+ ): void;
1132
+ get(
1133
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1134
+ ): void;
1135
+ get(
1136
+ paramsOrCallback?:
1137
+ | Params$Resource$Customers$Apps$Web$Get
1138
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1139
+ | BodyResponseCallback<Readable>,
1140
+ optionsOrCallback?:
1141
+ | MethodOptions
1142
+ | StreamMethodOptions
1143
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1144
+ | BodyResponseCallback<Readable>,
1145
+ callback?:
1146
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1AppDetails>
1147
+ | BodyResponseCallback<Readable>
1148
+ ):
1149
+ | void
1150
+ | GaxiosPromise<Schema$GoogleChromeManagementV1AppDetails>
1151
+ | GaxiosPromise<Readable> {
1152
+ let params = (paramsOrCallback ||
1153
+ {}) as Params$Resource$Customers$Apps$Web$Get;
1154
+ let options = (optionsOrCallback || {}) as MethodOptions;
1155
+
1156
+ if (typeof paramsOrCallback === 'function') {
1157
+ callback = paramsOrCallback;
1158
+ params = {} as Params$Resource$Customers$Apps$Web$Get;
1159
+ options = {};
1160
+ }
1161
+
1162
+ if (typeof optionsOrCallback === 'function') {
1163
+ callback = optionsOrCallback;
1164
+ options = {};
1165
+ }
1166
+
1167
+ const rootUrl =
1168
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
1169
+ const parameters = {
1170
+ options: Object.assign(
1171
+ {
1172
+ url: (rootUrl + '/v1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
1173
+ method: 'GET',
1174
+ },
1175
+ options
1176
+ ),
1177
+ params,
1178
+ requiredParams: ['name'],
1179
+ pathParams: ['name'],
1180
+ context: this.context,
1181
+ };
1182
+ if (callback) {
1183
+ createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
1184
+ parameters,
1185
+ callback as BodyResponseCallback<unknown>
1186
+ );
1187
+ } else {
1188
+ return createAPIRequest<Schema$GoogleChromeManagementV1AppDetails>(
1189
+ parameters
1190
+ );
1191
+ }
1192
+ }
1193
+ }
1194
+
1195
+ export interface Params$Resource$Customers$Apps$Web$Get
1196
+ extends StandardParameters {
1197
+ /**
1198
+ * Required. The app for which details are being queried. Examples: "customers/my_customer/apps/chrome/gmbmikajjgmnabiglmofipeabaddhgne@2.1.2" for the Save to Google Drive Chrome extension version 2.1.2, "customers/my_customer/apps/android/com.google.android.apps.docs" for the Google Drive Android app's latest version.
1199
+ */
1200
+ name?: string;
1201
+ }
1202
+
1203
+ export class Resource$Customers$Reports {
1204
+ context: APIRequestContext;
1205
+ constructor(context: APIRequestContext) {
1206
+ this.context = context;
1207
+ }
1208
+
1209
+ /**
1210
+ * Generate report of installed Chrome versions.
1211
+ * @example
1212
+ * ```js
1213
+ * // Before running the sample:
1214
+ * // - Enable the API at:
1215
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
1216
+ * // - Login into gcloud by running:
1217
+ * // `$ gcloud auth application-default login`
1218
+ * // - Install the npm module by running:
1219
+ * // `$ npm install googleapis`
1220
+ *
1221
+ * const {google} = require('googleapis');
1222
+ * const chromemanagement = google.chromemanagement('v1');
1223
+ *
1224
+ * async function main() {
1225
+ * const auth = new google.auth.GoogleAuth({
1226
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1227
+ * scopes: [
1228
+ * 'https://www.googleapis.com/auth/chrome.management.reports.readonly',
1229
+ * ],
1230
+ * });
1231
+ *
1232
+ * // Acquire an auth client, and bind it to all future calls
1233
+ * const authClient = await auth.getClient();
1234
+ * google.options({auth: authClient});
1235
+ *
1236
+ * // Do the magic
1237
+ * const res = await chromemanagement.customers.reports.countChromeVersions({
1238
+ * // Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1239
+ * customer: 'customers/my-customer',
1240
+ * // Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date
1241
+ * filter: 'placeholder-value',
1242
+ * // The ID of the organizational unit.
1243
+ * orgUnitId: 'placeholder-value',
1244
+ * // Maximum number of results to return. Maximum and default are 100.
1245
+ * pageSize: 'placeholder-value',
1246
+ * // Token to specify the page of the request to be returned.
1247
+ * pageToken: 'placeholder-value',
1248
+ * });
1249
+ * console.log(res.data);
1250
+ *
1251
+ * // Example response
1252
+ * // {
1253
+ * // "browserVersions": [],
1254
+ * // "nextPageToken": "my_nextPageToken",
1255
+ * // "totalSize": 0
1256
+ * // }
1257
+ * }
1258
+ *
1259
+ * main().catch(e => {
1260
+ * console.error(e);
1261
+ * throw e;
1262
+ * });
1263
+ *
1264
+ * ```
1265
+ *
1266
+ * @param params - Parameters for request
1267
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1268
+ * @param callback - Optional callback that handles the response.
1269
+ * @returns A promise if used with async/await, or void if used with a callback.
1270
+ */
1271
+ countChromeVersions(
1272
+ params: Params$Resource$Customers$Reports$Countchromeversions,
1273
+ options: StreamMethodOptions
1274
+ ): GaxiosPromise<Readable>;
1275
+ countChromeVersions(
1276
+ params?: Params$Resource$Customers$Reports$Countchromeversions,
1277
+ options?: MethodOptions
1278
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>;
1279
+ countChromeVersions(
1280
+ params: Params$Resource$Customers$Reports$Countchromeversions,
1281
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1282
+ callback: BodyResponseCallback<Readable>
1283
+ ): void;
1284
+ countChromeVersions(
1285
+ params: Params$Resource$Customers$Reports$Countchromeversions,
1286
+ options:
1287
+ | MethodOptions
1288
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>,
1289
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1290
+ ): void;
1291
+ countChromeVersions(
1292
+ params: Params$Resource$Customers$Reports$Countchromeversions,
1293
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1294
+ ): void;
1295
+ countChromeVersions(
1296
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1297
+ ): void;
1298
+ countChromeVersions(
1299
+ paramsOrCallback?:
1300
+ | Params$Resource$Customers$Reports$Countchromeversions
1301
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1302
+ | BodyResponseCallback<Readable>,
1303
+ optionsOrCallback?:
1304
+ | MethodOptions
1305
+ | StreamMethodOptions
1306
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1307
+ | BodyResponseCallback<Readable>,
1308
+ callback?:
1309
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1310
+ | BodyResponseCallback<Readable>
1311
+ ):
1312
+ | void
1313
+ | GaxiosPromise<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>
1314
+ | GaxiosPromise<Readable> {
1315
+ let params = (paramsOrCallback ||
1316
+ {}) as Params$Resource$Customers$Reports$Countchromeversions;
1317
+ let options = (optionsOrCallback || {}) as MethodOptions;
1318
+
1319
+ if (typeof paramsOrCallback === 'function') {
1320
+ callback = paramsOrCallback;
1321
+ params = {} as Params$Resource$Customers$Reports$Countchromeversions;
1322
+ options = {};
1323
+ }
1324
+
1325
+ if (typeof optionsOrCallback === 'function') {
1326
+ callback = optionsOrCallback;
1327
+ options = {};
1328
+ }
1329
+
1330
+ const rootUrl =
1331
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
1332
+ const parameters = {
1333
+ options: Object.assign(
1334
+ {
1335
+ url: (
1336
+ rootUrl + '/v1/{+customer}/reports:countChromeVersions'
1337
+ ).replace(/([^:]\/)\/+/g, '$1'),
1338
+ method: 'GET',
1339
+ },
1340
+ options
1341
+ ),
1342
+ params,
1343
+ requiredParams: ['customer'],
1344
+ pathParams: ['customer'],
1345
+ context: this.context,
1346
+ };
1347
+ if (callback) {
1348
+ createAPIRequest<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>(
1349
+ parameters,
1350
+ callback as BodyResponseCallback<unknown>
1351
+ );
1352
+ } else {
1353
+ return createAPIRequest<Schema$GoogleChromeManagementV1CountChromeVersionsResponse>(
1354
+ parameters
1355
+ );
1356
+ }
1357
+ }
1358
+
1359
+ /**
1360
+ * Generate report of app installations.
1361
+ * @example
1362
+ * ```js
1363
+ * // Before running the sample:
1364
+ * // - Enable the API at:
1365
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
1366
+ * // - Login into gcloud by running:
1367
+ * // `$ gcloud auth application-default login`
1368
+ * // - Install the npm module by running:
1369
+ * // `$ npm install googleapis`
1370
+ *
1371
+ * const {google} = require('googleapis');
1372
+ * const chromemanagement = google.chromemanagement('v1');
1373
+ *
1374
+ * async function main() {
1375
+ * const auth = new google.auth.GoogleAuth({
1376
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1377
+ * scopes: [
1378
+ * 'https://www.googleapis.com/auth/chrome.management.reports.readonly',
1379
+ * ],
1380
+ * });
1381
+ *
1382
+ * // Acquire an auth client, and bind it to all future calls
1383
+ * const authClient = await auth.getClient();
1384
+ * google.options({auth: authClient});
1385
+ *
1386
+ * // Do the magic
1387
+ * const res = await chromemanagement.customers.reports.countInstalledApps({
1388
+ * // Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1389
+ * customer: 'customers/my-customer',
1390
+ * // Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * app_name * app_type * install_type * number_of_permissions * total_install_count * latest_profile_active_date * permission_name
1391
+ * filter: 'placeholder-value',
1392
+ * // Field used to order results. Supported order by fields: * app_name * app_type * install_type * number_of_permissions * total_install_count
1393
+ * orderBy: 'placeholder-value',
1394
+ * // The ID of the organizational unit.
1395
+ * orgUnitId: 'placeholder-value',
1396
+ * // Maximum number of results to return. Maximum and default are 100.
1397
+ * pageSize: 'placeholder-value',
1398
+ * // Token to specify the page of the request to be returned.
1399
+ * pageToken: 'placeholder-value',
1400
+ * });
1401
+ * console.log(res.data);
1402
+ *
1403
+ * // Example response
1404
+ * // {
1405
+ * // "installedApps": [],
1406
+ * // "nextPageToken": "my_nextPageToken",
1407
+ * // "totalSize": 0
1408
+ * // }
1409
+ * }
1410
+ *
1411
+ * main().catch(e => {
1412
+ * console.error(e);
1413
+ * throw e;
1414
+ * });
1415
+ *
1416
+ * ```
1417
+ *
1418
+ * @param params - Parameters for request
1419
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1420
+ * @param callback - Optional callback that handles the response.
1421
+ * @returns A promise if used with async/await, or void if used with a callback.
1422
+ */
1423
+ countInstalledApps(
1424
+ params: Params$Resource$Customers$Reports$Countinstalledapps,
1425
+ options: StreamMethodOptions
1426
+ ): GaxiosPromise<Readable>;
1427
+ countInstalledApps(
1428
+ params?: Params$Resource$Customers$Reports$Countinstalledapps,
1429
+ options?: MethodOptions
1430
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>;
1431
+ countInstalledApps(
1432
+ params: Params$Resource$Customers$Reports$Countinstalledapps,
1433
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1434
+ callback: BodyResponseCallback<Readable>
1435
+ ): void;
1436
+ countInstalledApps(
1437
+ params: Params$Resource$Customers$Reports$Countinstalledapps,
1438
+ options:
1439
+ | MethodOptions
1440
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>,
1441
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1442
+ ): void;
1443
+ countInstalledApps(
1444
+ params: Params$Resource$Customers$Reports$Countinstalledapps,
1445
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1446
+ ): void;
1447
+ countInstalledApps(
1448
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1449
+ ): void;
1450
+ countInstalledApps(
1451
+ paramsOrCallback?:
1452
+ | Params$Resource$Customers$Reports$Countinstalledapps
1453
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1454
+ | BodyResponseCallback<Readable>,
1455
+ optionsOrCallback?:
1456
+ | MethodOptions
1457
+ | StreamMethodOptions
1458
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1459
+ | BodyResponseCallback<Readable>,
1460
+ callback?:
1461
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1462
+ | BodyResponseCallback<Readable>
1463
+ ):
1464
+ | void
1465
+ | GaxiosPromise<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>
1466
+ | GaxiosPromise<Readable> {
1467
+ let params = (paramsOrCallback ||
1468
+ {}) as Params$Resource$Customers$Reports$Countinstalledapps;
1469
+ let options = (optionsOrCallback || {}) as MethodOptions;
1470
+
1471
+ if (typeof paramsOrCallback === 'function') {
1472
+ callback = paramsOrCallback;
1473
+ params = {} as Params$Resource$Customers$Reports$Countinstalledapps;
1474
+ options = {};
1475
+ }
1476
+
1477
+ if (typeof optionsOrCallback === 'function') {
1478
+ callback = optionsOrCallback;
1479
+ options = {};
1480
+ }
1481
+
1482
+ const rootUrl =
1483
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
1484
+ const parameters = {
1485
+ options: Object.assign(
1486
+ {
1487
+ url: (
1488
+ rootUrl + '/v1/{+customer}/reports:countInstalledApps'
1489
+ ).replace(/([^:]\/)\/+/g, '$1'),
1490
+ method: 'GET',
1491
+ },
1492
+ options
1493
+ ),
1494
+ params,
1495
+ requiredParams: ['customer'],
1496
+ pathParams: ['customer'],
1497
+ context: this.context,
1498
+ };
1499
+ if (callback) {
1500
+ createAPIRequest<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>(
1501
+ parameters,
1502
+ callback as BodyResponseCallback<unknown>
1503
+ );
1504
+ } else {
1505
+ return createAPIRequest<Schema$GoogleChromeManagementV1CountInstalledAppsResponse>(
1506
+ parameters
1507
+ );
1508
+ }
1509
+ }
1510
+
1511
+ /**
1512
+ * Generate report of devices that have a specified app installed.
1513
+ * @example
1514
+ * ```js
1515
+ * // Before running the sample:
1516
+ * // - Enable the API at:
1517
+ * // https://console.developers.google.com/apis/api/chromemanagement.googleapis.com
1518
+ * // - Login into gcloud by running:
1519
+ * // `$ gcloud auth application-default login`
1520
+ * // - Install the npm module by running:
1521
+ * // `$ npm install googleapis`
1522
+ *
1523
+ * const {google} = require('googleapis');
1524
+ * const chromemanagement = google.chromemanagement('v1');
1525
+ *
1526
+ * async function main() {
1527
+ * const auth = new google.auth.GoogleAuth({
1528
+ * // Scopes can be specified either as an array or as a single, space-delimited string.
1529
+ * scopes: [
1530
+ * 'https://www.googleapis.com/auth/chrome.management.reports.readonly',
1531
+ * ],
1532
+ * });
1533
+ *
1534
+ * // Acquire an auth client, and bind it to all future calls
1535
+ * const authClient = await auth.getClient();
1536
+ * google.options({auth: authClient});
1537
+ *
1538
+ * // Do the magic
1539
+ * const res = await chromemanagement.customers.reports.findInstalledAppDevices({
1540
+ * // Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).
1541
+ * appId: 'placeholder-value',
1542
+ * // Type of the app.
1543
+ * appType: 'placeholder-value',
1544
+ * // Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1545
+ * customer: 'customers/my-customer',
1546
+ * // Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date
1547
+ * filter: 'placeholder-value',
1548
+ * // Field used to order results. Supported order by fields: * machine * device_id
1549
+ * orderBy: 'placeholder-value',
1550
+ * // The ID of the organizational unit.
1551
+ * orgUnitId: 'placeholder-value',
1552
+ * // Maximum number of results to return. Maximum and default are 100.
1553
+ * pageSize: 'placeholder-value',
1554
+ * // Token to specify the page of the request to be returned.
1555
+ * pageToken: 'placeholder-value',
1556
+ * });
1557
+ * console.log(res.data);
1558
+ *
1559
+ * // Example response
1560
+ * // {
1561
+ * // "devices": [],
1562
+ * // "nextPageToken": "my_nextPageToken",
1563
+ * // "totalSize": 0
1564
+ * // }
1565
+ * }
1566
+ *
1567
+ * main().catch(e => {
1568
+ * console.error(e);
1569
+ * throw e;
1570
+ * });
1571
+ *
1572
+ * ```
1573
+ *
1574
+ * @param params - Parameters for request
1575
+ * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
1576
+ * @param callback - Optional callback that handles the response.
1577
+ * @returns A promise if used with async/await, or void if used with a callback.
1578
+ */
1579
+ findInstalledAppDevices(
1580
+ params: Params$Resource$Customers$Reports$Findinstalledappdevices,
1581
+ options: StreamMethodOptions
1582
+ ): GaxiosPromise<Readable>;
1583
+ findInstalledAppDevices(
1584
+ params?: Params$Resource$Customers$Reports$Findinstalledappdevices,
1585
+ options?: MethodOptions
1586
+ ): GaxiosPromise<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>;
1587
+ findInstalledAppDevices(
1588
+ params: Params$Resource$Customers$Reports$Findinstalledappdevices,
1589
+ options: StreamMethodOptions | BodyResponseCallback<Readable>,
1590
+ callback: BodyResponseCallback<Readable>
1591
+ ): void;
1592
+ findInstalledAppDevices(
1593
+ params: Params$Resource$Customers$Reports$Findinstalledappdevices,
1594
+ options:
1595
+ | MethodOptions
1596
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>,
1597
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1598
+ ): void;
1599
+ findInstalledAppDevices(
1600
+ params: Params$Resource$Customers$Reports$Findinstalledappdevices,
1601
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1602
+ ): void;
1603
+ findInstalledAppDevices(
1604
+ callback: BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1605
+ ): void;
1606
+ findInstalledAppDevices(
1607
+ paramsOrCallback?:
1608
+ | Params$Resource$Customers$Reports$Findinstalledappdevices
1609
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1610
+ | BodyResponseCallback<Readable>,
1611
+ optionsOrCallback?:
1612
+ | MethodOptions
1613
+ | StreamMethodOptions
1614
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1615
+ | BodyResponseCallback<Readable>,
1616
+ callback?:
1617
+ | BodyResponseCallback<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1618
+ | BodyResponseCallback<Readable>
1619
+ ):
1620
+ | void
1621
+ | GaxiosPromise<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>
1622
+ | GaxiosPromise<Readable> {
1623
+ let params = (paramsOrCallback ||
1624
+ {}) as Params$Resource$Customers$Reports$Findinstalledappdevices;
1625
+ let options = (optionsOrCallback || {}) as MethodOptions;
1626
+
1627
+ if (typeof paramsOrCallback === 'function') {
1628
+ callback = paramsOrCallback;
1629
+ params =
1630
+ {} as Params$Resource$Customers$Reports$Findinstalledappdevices;
1631
+ options = {};
1632
+ }
1633
+
1634
+ if (typeof optionsOrCallback === 'function') {
1635
+ callback = optionsOrCallback;
1636
+ options = {};
1637
+ }
1638
+
1639
+ const rootUrl =
1640
+ options.rootUrl || 'https://chromemanagement.googleapis.com/';
1641
+ const parameters = {
1642
+ options: Object.assign(
1643
+ {
1644
+ url: (
1645
+ rootUrl + '/v1/{+customer}/reports:findInstalledAppDevices'
1646
+ ).replace(/([^:]\/)\/+/g, '$1'),
1647
+ method: 'GET',
1648
+ },
1649
+ options
1650
+ ),
1651
+ params,
1652
+ requiredParams: ['customer'],
1653
+ pathParams: ['customer'],
1654
+ context: this.context,
1655
+ };
1656
+ if (callback) {
1657
+ createAPIRequest<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>(
1658
+ parameters,
1659
+ callback as BodyResponseCallback<unknown>
1660
+ );
1661
+ } else {
1662
+ return createAPIRequest<Schema$GoogleChromeManagementV1FindInstalledAppDevicesResponse>(
1663
+ parameters
1664
+ );
1665
+ }
1666
+ }
1667
+ }
1668
+
1669
+ export interface Params$Resource$Customers$Reports$Countchromeversions
1670
+ extends StandardParameters {
1671
+ /**
1672
+ * Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1673
+ */
1674
+ customer?: string;
1675
+ /**
1676
+ * Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date
1677
+ */
1678
+ filter?: string;
1679
+ /**
1680
+ * The ID of the organizational unit.
1681
+ */
1682
+ orgUnitId?: string;
1683
+ /**
1684
+ * Maximum number of results to return. Maximum and default are 100.
1685
+ */
1686
+ pageSize?: number;
1687
+ /**
1688
+ * Token to specify the page of the request to be returned.
1689
+ */
1690
+ pageToken?: string;
1691
+ }
1692
+ export interface Params$Resource$Customers$Reports$Countinstalledapps
1693
+ extends StandardParameters {
1694
+ /**
1695
+ * Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1696
+ */
1697
+ customer?: string;
1698
+ /**
1699
+ * Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * app_name * app_type * install_type * number_of_permissions * total_install_count * latest_profile_active_date * permission_name
1700
+ */
1701
+ filter?: string;
1702
+ /**
1703
+ * Field used to order results. Supported order by fields: * app_name * app_type * install_type * number_of_permissions * total_install_count
1704
+ */
1705
+ orderBy?: string;
1706
+ /**
1707
+ * The ID of the organizational unit.
1708
+ */
1709
+ orgUnitId?: string;
1710
+ /**
1711
+ * Maximum number of results to return. Maximum and default are 100.
1712
+ */
1713
+ pageSize?: number;
1714
+ /**
1715
+ * Token to specify the page of the request to be returned.
1716
+ */
1717
+ pageToken?: string;
1718
+ }
1719
+ export interface Params$Resource$Customers$Reports$Findinstalledappdevices
1720
+ extends StandardParameters {
1721
+ /**
1722
+ * Unique identifier of the app. For Chrome apps and extensions, the 32-character id (e.g. ehoadneljpdggcbbknedodolkkjodefl). For Android apps, the package name (e.g. com.evernote).
1723
+ */
1724
+ appId?: string;
1725
+ /**
1726
+ * Type of the app.
1727
+ */
1728
+ appType?: string;
1729
+ /**
1730
+ * Required. Customer id or "my_customer" to use the customer associated to the account making the request.
1731
+ */
1732
+ customer?: string;
1733
+ /**
1734
+ * Query string to filter results, AND-separated fields in EBNF syntax. Note: OR operations are not supported in this filter. Supported filter fields: * last_active_date
1735
+ */
1736
+ filter?: string;
1737
+ /**
1738
+ * Field used to order results. Supported order by fields: * machine * device_id
1739
+ */
1740
+ orderBy?: string;
1741
+ /**
1742
+ * The ID of the organizational unit.
1743
+ */
1744
+ orgUnitId?: string;
1745
+ /**
1746
+ * Maximum number of results to return. Maximum and default are 100.
1747
+ */
1748
+ pageSize?: number;
1749
+ /**
1750
+ * Token to specify the page of the request to be returned.
1751
+ */
1752
+ pageToken?: string;
1753
+ }
1754
+ }