@maxim_mazurok/gapi.client.admin-reports_v1 0.0.20220809

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,993 @@
1
+ /* Type definitions for non-npm package Admin SDK API reports_v1 0.0 */
2
+ // Project: https://developers.google.com/admin-sdk/
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://admin.googleapis.com/$discovery/rest?version=reports_v1
13
+ // Revision: 20220809
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Admin SDK API reports_v1 */
19
+ function load(urlOrObject: "https://admin.googleapis.com/$discovery/rest?version=reports_v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "admin", version: "reports_v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "admin", version: "reports_v1", callback: () => any): void;
24
+
25
+ namespace admin {
26
+ interface Activities {
27
+ /** ETag of the resource. */
28
+ etag?: string;
29
+ /** Each activity record in the response. */
30
+ items?: Activity[];
31
+ /** The type of API resource. For an activity report, the value is `reports#activities`. */
32
+ kind?: string;
33
+ /** Token for retrieving the follow-on next page of the report. The `nextPageToken` value is used in the request's `pageToken` query string. */
34
+ nextPageToken?: string;
35
+ }
36
+ interface Activity {
37
+ /** User doing the action. */
38
+ actor?: {
39
+ /** The type of actor. */
40
+ callerType?: string;
41
+ /** The primary email address of the actor. May be absent if there is no email address associated with the actor. */
42
+ email?: string;
43
+ /** Only present when `callerType` is `KEY`. Can be the `consumer_key` of the requestor for OAuth 2LO API requests or an identifier for robot accounts. */
44
+ key?: string;
45
+ /**
46
+ * The unique Google Workspace profile ID of the actor. This value might be absent if the actor is not a Google Workspace user, or may be the number 105250506097979753968 which
47
+ * acts as a placeholder ID.
48
+ */
49
+ profileId?: string;
50
+ };
51
+ /** ETag of the entry. */
52
+ etag?: string;
53
+ /** Activity events in the report. */
54
+ events?: Array<{
55
+ /**
56
+ * Name of the event. This is the specific name of the activity reported by the API. And each `eventName` is related to a specific Google Workspace service or feature which the API
57
+ * organizes into types of events. For `eventName` request parameters in general: - If no `eventName` is given, the report returns all possible instances of an `eventName`. - When
58
+ * you request an `eventName`, the API's response returns all activities which contain that `eventName`. It is possible that the returned activities will have other `eventName`
59
+ * properties in addition to the one requested. For more information about `eventName` properties, see the list of event names for various applications above in `applicationName`.
60
+ */
61
+ name?: string;
62
+ /**
63
+ * Parameter value pairs for various applications. For more information about `eventName` parameters, see the list of event names for various applications above in
64
+ * `applicationName`.
65
+ */
66
+ parameters?: Array<{
67
+ /** Boolean value of the parameter. */
68
+ boolValue?: boolean;
69
+ /** Integer value of the parameter. */
70
+ intValue?: string;
71
+ /**
72
+ * Nested parameter value pairs associated with this parameter. Complex value type for a parameter are returned as a list of parameter values. For example, the address
73
+ * parameter may have a value as `[{parameter: [{name: city, value: abc}]}]`
74
+ */
75
+ messageValue?: {
76
+ /** Parameter values */
77
+ parameter?: NestedParameter[];
78
+ };
79
+ /** Integer values of the parameter. */
80
+ multiIntValue?: string[];
81
+ /** List of `messageValue` objects. */
82
+ multiMessageValue?: Array<{
83
+ /** Parameter values */
84
+ parameter?: NestedParameter[];
85
+ }>;
86
+ /** String values of the parameter. */
87
+ multiValue?: string[];
88
+ /** The name of the parameter. */
89
+ name?: string;
90
+ /** String value of the parameter. */
91
+ value?: string;
92
+ }>;
93
+ /**
94
+ * Type of event. The Google Workspace service or feature that an administrator changes is identified in the `type` property which identifies an event using the `eventName`
95
+ * property. For a full list of the API's `type` categories, see the list of event names for various applications above in `applicationName`.
96
+ */
97
+ type?: string;
98
+ }>;
99
+ /** Unique identifier for each activity record. */
100
+ id?: {
101
+ /** Application name to which the event belongs. For possible values see the list of applications above in `applicationName`. */
102
+ applicationName?: string;
103
+ /** The unique identifier for a Google Workspace account. */
104
+ customerId?: string;
105
+ /** Time of occurrence of the activity. This is in UNIX epoch time in seconds. */
106
+ time?: string;
107
+ /** Unique qualifier if multiple events have the same time. */
108
+ uniqueQualifier?: string;
109
+ };
110
+ /**
111
+ * IP address of the user doing the action. This is the Internet Protocol (IP) address of the user when logging into Google Workspace, which may or may not reflect the user's physical
112
+ * location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. The API supports IPv4 and IPv6.
113
+ */
114
+ ipAddress?: string;
115
+ /** The type of API resource. For an activity report, the value is `audit#activity`. */
116
+ kind?: string;
117
+ /** This is the domain that is affected by the report's event. For example domain of Admin console or the Drive application's document owner. */
118
+ ownerDomain?: string;
119
+ }
120
+ interface Channel {
121
+ /** The address where notifications are delivered for this channel. */
122
+ address?: string;
123
+ /** Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */
124
+ expiration?: string;
125
+ /** A UUID or similar unique string that identifies this channel. */
126
+ id?: string;
127
+ /** Identifies this as a notification channel used to watch for changes to a resource, which is "`api#channel`". */
128
+ kind?: string;
129
+ /** Additional parameters controlling delivery channel behavior. Optional. */
130
+ params?: { [P in string]: string };
131
+ /** A Boolean value to indicate whether payload is wanted. Optional. */
132
+ payload?: boolean;
133
+ /** An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */
134
+ resourceId?: string;
135
+ /** A version-specific identifier for the watched resource. */
136
+ resourceUri?: string;
137
+ /** An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */
138
+ token?: string;
139
+ /** The type of delivery mechanism used for this channel. The value should be set to `"web_hook"`. */
140
+ type?: string;
141
+ }
142
+ interface NestedParameter {
143
+ /** Boolean value of the parameter. */
144
+ boolValue?: boolean;
145
+ /** Integer value of the parameter. */
146
+ intValue?: string;
147
+ /** Multiple boolean values of the parameter. */
148
+ multiBoolValue?: boolean[];
149
+ /** Multiple integer values of the parameter. */
150
+ multiIntValue?: string[];
151
+ /** Multiple string values of the parameter. */
152
+ multiValue?: string[];
153
+ /** The name of the parameter. */
154
+ name?: string;
155
+ /** String value of the parameter. */
156
+ value?: string;
157
+ }
158
+ interface UsageReport {
159
+ /** Output only. The date of the report request. */
160
+ date?: string;
161
+ /** Output only. Information about the type of the item. */
162
+ entity?: {
163
+ /** Output only. The unique identifier of the customer's account. */
164
+ customerId?: string;
165
+ /** Output only. Object key. Only relevant if entity.type = "OBJECT" Note: external-facing name of report is "Entities" rather than "Objects". */
166
+ entityId?: string;
167
+ /** Output only. The user's immutable Google Workspace profile identifier. */
168
+ profileId?: string;
169
+ /** Output only. The type of item. The value is `user`. */
170
+ type?: string;
171
+ /** Output only. The user's email address. Only relevant if entity.type = "USER" */
172
+ userEmail?: string;
173
+ };
174
+ /** ETag of the resource. */
175
+ etag?: string;
176
+ /** The type of API resource. For a usage report, the value is `admin#reports#usageReport`. */
177
+ kind?: string;
178
+ /**
179
+ * Output only. Parameter value pairs for various applications. For the Entity Usage Report parameters and values, see [the Entity Usage parameters
180
+ * reference](/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities).
181
+ */
182
+ parameters?: Array<{
183
+ /** Output only. Boolean value of the parameter. */
184
+ boolValue?: boolean;
185
+ /** The RFC 3339 formatted value of the parameter, for example 2010-10-28T10:26:35.000Z. */
186
+ datetimeValue?: string;
187
+ /** Output only. Integer value of the parameter. */
188
+ intValue?: string;
189
+ /** Output only. Nested message value of the parameter. */
190
+ msgValue?: Array<{ [P in string]: any }>;
191
+ /** The name of the parameter. For the User Usage Report parameter names, see the User Usage parameters reference. */
192
+ name?: string;
193
+ /** Output only. String value of the parameter. */
194
+ stringValue?: string;
195
+ }>;
196
+ }
197
+ interface UsageReports {
198
+ /** ETag of the resource. */
199
+ etag?: string;
200
+ /** The type of API resource. For a usage report, the value is `admin#reports#usageReports`. */
201
+ kind?: string;
202
+ /**
203
+ * Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. For your follow-on requests getting all of the report's pages, enter the
204
+ * `nextPageToken` value in the `pageToken` query string.
205
+ */
206
+ nextPageToken?: string;
207
+ /** Various application parameter records. */
208
+ usageReports?: UsageReport[];
209
+ /** Warnings, if any. */
210
+ warnings?: Array<{
211
+ /** Machine readable code or warning type. The warning code value is `200`. */
212
+ code?: string;
213
+ /** Key-value pairs to give detailed information on the warning. */
214
+ data?: Array<{
215
+ /** Key associated with a key-value pair to give detailed information on the warning. */
216
+ key?: string;
217
+ /** Value associated with a key-value pair to give detailed information on the warning. */
218
+ value?: string;
219
+ }>;
220
+ /**
221
+ * The human readable messages for a warning are: - Data is not available warning - Sorry, data for date yyyy-mm-dd for application "`application name`" is not available. - Partial
222
+ * data is available warning - Data for date yyyy-mm-dd for application "`application name`" is not available right now, please try again after a few hours.
223
+ */
224
+ message?: string;
225
+ }>;
226
+ }
227
+ interface ChannelsResource {
228
+ /** Stop watching resources through this channel. */
229
+ stop(request: {
230
+ /** V1 error format. */
231
+ "$.xgafv"?: string;
232
+ /** OAuth access token. */
233
+ access_token?: string;
234
+ /** Data format for response. */
235
+ alt?: string;
236
+ /** JSONP */
237
+ callback?: string;
238
+ /** Selector specifying which fields to include in a partial response. */
239
+ fields?: string;
240
+ /** 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. */
241
+ key?: string;
242
+ /** OAuth 2.0 token for the current user. */
243
+ oauth_token?: string;
244
+ /** Returns response with indentations and line breaks. */
245
+ prettyPrint?: boolean;
246
+ /** 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. */
247
+ quotaUser?: string;
248
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
249
+ upload_protocol?: string;
250
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
251
+ uploadType?: string;
252
+ /** Request body */
253
+ resource: Channel;
254
+ }): Request<void>;
255
+ stop(request: {
256
+ /** V1 error format. */
257
+ "$.xgafv"?: string;
258
+ /** OAuth access token. */
259
+ access_token?: string;
260
+ /** Data format for response. */
261
+ alt?: string;
262
+ /** JSONP */
263
+ callback?: string;
264
+ /** Selector specifying which fields to include in a partial response. */
265
+ fields?: string;
266
+ /** 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. */
267
+ key?: string;
268
+ /** OAuth 2.0 token for the current user. */
269
+ oauth_token?: string;
270
+ /** Returns response with indentations and line breaks. */
271
+ prettyPrint?: boolean;
272
+ /** 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. */
273
+ quotaUser?: string;
274
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
275
+ upload_protocol?: string;
276
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
277
+ uploadType?: string;
278
+ },
279
+ body: Channel): Request<void>;
280
+ }
281
+
282
+ const channels: ChannelsResource;
283
+ }
284
+ namespace reports {
285
+ interface Activities {
286
+ /** ETag of the resource. */
287
+ etag?: string;
288
+ /** Each activity record in the response. */
289
+ items?: Activity[];
290
+ /** The type of API resource. For an activity report, the value is `reports#activities`. */
291
+ kind?: string;
292
+ /** Token for retrieving the follow-on next page of the report. The `nextPageToken` value is used in the request's `pageToken` query string. */
293
+ nextPageToken?: string;
294
+ }
295
+ interface Activity {
296
+ /** User doing the action. */
297
+ actor?: {
298
+ /** The type of actor. */
299
+ callerType?: string;
300
+ /** The primary email address of the actor. May be absent if there is no email address associated with the actor. */
301
+ email?: string;
302
+ /** Only present when `callerType` is `KEY`. Can be the `consumer_key` of the requestor for OAuth 2LO API requests or an identifier for robot accounts. */
303
+ key?: string;
304
+ /**
305
+ * The unique Google Workspace profile ID of the actor. This value might be absent if the actor is not a Google Workspace user, or may be the number 105250506097979753968 which
306
+ * acts as a placeholder ID.
307
+ */
308
+ profileId?: string;
309
+ };
310
+ /** ETag of the entry. */
311
+ etag?: string;
312
+ /** Activity events in the report. */
313
+ events?: Array<{
314
+ /**
315
+ * Name of the event. This is the specific name of the activity reported by the API. And each `eventName` is related to a specific Google Workspace service or feature which the API
316
+ * organizes into types of events. For `eventName` request parameters in general: - If no `eventName` is given, the report returns all possible instances of an `eventName`. - When
317
+ * you request an `eventName`, the API's response returns all activities which contain that `eventName`. It is possible that the returned activities will have other `eventName`
318
+ * properties in addition to the one requested. For more information about `eventName` properties, see the list of event names for various applications above in `applicationName`.
319
+ */
320
+ name?: string;
321
+ /**
322
+ * Parameter value pairs for various applications. For more information about `eventName` parameters, see the list of event names for various applications above in
323
+ * `applicationName`.
324
+ */
325
+ parameters?: Array<{
326
+ /** Boolean value of the parameter. */
327
+ boolValue?: boolean;
328
+ /** Integer value of the parameter. */
329
+ intValue?: string;
330
+ /**
331
+ * Nested parameter value pairs associated with this parameter. Complex value type for a parameter are returned as a list of parameter values. For example, the address
332
+ * parameter may have a value as `[{parameter: [{name: city, value: abc}]}]`
333
+ */
334
+ messageValue?: {
335
+ /** Parameter values */
336
+ parameter?: NestedParameter[];
337
+ };
338
+ /** Integer values of the parameter. */
339
+ multiIntValue?: string[];
340
+ /** List of `messageValue` objects. */
341
+ multiMessageValue?: Array<{
342
+ /** Parameter values */
343
+ parameter?: NestedParameter[];
344
+ }>;
345
+ /** String values of the parameter. */
346
+ multiValue?: string[];
347
+ /** The name of the parameter. */
348
+ name?: string;
349
+ /** String value of the parameter. */
350
+ value?: string;
351
+ }>;
352
+ /**
353
+ * Type of event. The Google Workspace service or feature that an administrator changes is identified in the `type` property which identifies an event using the `eventName`
354
+ * property. For a full list of the API's `type` categories, see the list of event names for various applications above in `applicationName`.
355
+ */
356
+ type?: string;
357
+ }>;
358
+ /** Unique identifier for each activity record. */
359
+ id?: {
360
+ /** Application name to which the event belongs. For possible values see the list of applications above in `applicationName`. */
361
+ applicationName?: string;
362
+ /** The unique identifier for a Google Workspace account. */
363
+ customerId?: string;
364
+ /** Time of occurrence of the activity. This is in UNIX epoch time in seconds. */
365
+ time?: string;
366
+ /** Unique qualifier if multiple events have the same time. */
367
+ uniqueQualifier?: string;
368
+ };
369
+ /**
370
+ * IP address of the user doing the action. This is the Internet Protocol (IP) address of the user when logging into Google Workspace, which may or may not reflect the user's physical
371
+ * location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. The API supports IPv4 and IPv6.
372
+ */
373
+ ipAddress?: string;
374
+ /** The type of API resource. For an activity report, the value is `audit#activity`. */
375
+ kind?: string;
376
+ /** This is the domain that is affected by the report's event. For example domain of Admin console or the Drive application's document owner. */
377
+ ownerDomain?: string;
378
+ }
379
+ interface Channel {
380
+ /** The address where notifications are delivered for this channel. */
381
+ address?: string;
382
+ /** Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. */
383
+ expiration?: string;
384
+ /** A UUID or similar unique string that identifies this channel. */
385
+ id?: string;
386
+ /** Identifies this as a notification channel used to watch for changes to a resource, which is "`api#channel`". */
387
+ kind?: string;
388
+ /** Additional parameters controlling delivery channel behavior. Optional. */
389
+ params?: { [P in string]: string };
390
+ /** A Boolean value to indicate whether payload is wanted. Optional. */
391
+ payload?: boolean;
392
+ /** An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. */
393
+ resourceId?: string;
394
+ /** A version-specific identifier for the watched resource. */
395
+ resourceUri?: string;
396
+ /** An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. */
397
+ token?: string;
398
+ /** The type of delivery mechanism used for this channel. The value should be set to `"web_hook"`. */
399
+ type?: string;
400
+ }
401
+ interface NestedParameter {
402
+ /** Boolean value of the parameter. */
403
+ boolValue?: boolean;
404
+ /** Integer value of the parameter. */
405
+ intValue?: string;
406
+ /** Multiple boolean values of the parameter. */
407
+ multiBoolValue?: boolean[];
408
+ /** Multiple integer values of the parameter. */
409
+ multiIntValue?: string[];
410
+ /** Multiple string values of the parameter. */
411
+ multiValue?: string[];
412
+ /** The name of the parameter. */
413
+ name?: string;
414
+ /** String value of the parameter. */
415
+ value?: string;
416
+ }
417
+ interface UsageReport {
418
+ /** Output only. The date of the report request. */
419
+ date?: string;
420
+ /** Output only. Information about the type of the item. */
421
+ entity?: {
422
+ /** Output only. The unique identifier of the customer's account. */
423
+ customerId?: string;
424
+ /** Output only. Object key. Only relevant if entity.type = "OBJECT" Note: external-facing name of report is "Entities" rather than "Objects". */
425
+ entityId?: string;
426
+ /** Output only. The user's immutable Google Workspace profile identifier. */
427
+ profileId?: string;
428
+ /** Output only. The type of item. The value is `user`. */
429
+ type?: string;
430
+ /** Output only. The user's email address. Only relevant if entity.type = "USER" */
431
+ userEmail?: string;
432
+ };
433
+ /** ETag of the resource. */
434
+ etag?: string;
435
+ /** The type of API resource. For a usage report, the value is `admin#reports#usageReport`. */
436
+ kind?: string;
437
+ /**
438
+ * Output only. Parameter value pairs for various applications. For the Entity Usage Report parameters and values, see [the Entity Usage parameters
439
+ * reference](/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities).
440
+ */
441
+ parameters?: Array<{
442
+ /** Output only. Boolean value of the parameter. */
443
+ boolValue?: boolean;
444
+ /** The RFC 3339 formatted value of the parameter, for example 2010-10-28T10:26:35.000Z. */
445
+ datetimeValue?: string;
446
+ /** Output only. Integer value of the parameter. */
447
+ intValue?: string;
448
+ /** Output only. Nested message value of the parameter. */
449
+ msgValue?: Array<{ [P in string]: any }>;
450
+ /** The name of the parameter. For the User Usage Report parameter names, see the User Usage parameters reference. */
451
+ name?: string;
452
+ /** Output only. String value of the parameter. */
453
+ stringValue?: string;
454
+ }>;
455
+ }
456
+ interface UsageReports {
457
+ /** ETag of the resource. */
458
+ etag?: string;
459
+ /** The type of API resource. For a usage report, the value is `admin#reports#usageReports`. */
460
+ kind?: string;
461
+ /**
462
+ * Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. For your follow-on requests getting all of the report's pages, enter the
463
+ * `nextPageToken` value in the `pageToken` query string.
464
+ */
465
+ nextPageToken?: string;
466
+ /** Various application parameter records. */
467
+ usageReports?: UsageReport[];
468
+ /** Warnings, if any. */
469
+ warnings?: Array<{
470
+ /** Machine readable code or warning type. The warning code value is `200`. */
471
+ code?: string;
472
+ /** Key-value pairs to give detailed information on the warning. */
473
+ data?: Array<{
474
+ /** Key associated with a key-value pair to give detailed information on the warning. */
475
+ key?: string;
476
+ /** Value associated with a key-value pair to give detailed information on the warning. */
477
+ value?: string;
478
+ }>;
479
+ /**
480
+ * The human readable messages for a warning are: - Data is not available warning - Sorry, data for date yyyy-mm-dd for application "`application name`" is not available. - Partial
481
+ * data is available warning - Data for date yyyy-mm-dd for application "`application name`" is not available right now, please try again after a few hours.
482
+ */
483
+ message?: string;
484
+ }>;
485
+ }
486
+ interface ActivitiesResource {
487
+ /**
488
+ * Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the
489
+ * guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
490
+ */
491
+ list(request?: {
492
+ /** V1 error format. */
493
+ "$.xgafv"?: string;
494
+ /** OAuth access token. */
495
+ access_token?: string;
496
+ /**
497
+ * The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity
498
+ * is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private
499
+ * network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
500
+ */
501
+ actorIpAddress?: string;
502
+ /** Data format for response. */
503
+ alt?: string;
504
+ /** Application name for which the events are to be retrieved. */
505
+ applicationName: string;
506
+ /** JSONP */
507
+ callback?: string;
508
+ /** The unique ID of the customer to retrieve data for. */
509
+ customerId?: string;
510
+ /**
511
+ * Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the
512
+ * API request. An API report has three basic time concepts: - *Date of the API's request for a report*: When the API created and retrieved the report. - *Report's start time*: The
513
+ * beginning of the timespan shown in the report. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an
514
+ * error. - *Report's end time*: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The
515
+ * report itself can be requested in August. If the `endTime` is not specified, the report returns all activities from the `startTime` until the current time or the most recent 180
516
+ * days if the `startTime` is more than 180 days in the past.
517
+ */
518
+ endTime?: string;
519
+ /**
520
+ * The name of the event being queried by the API. Each `eventName` is related to a specific Google Workspace service or feature which the API organizes into types of events. An
521
+ * example is the Google Calendar events in the Admin console application's reports. The Calendar Settings `type` structure has all of the Calendar `eventName` activities reported
522
+ * by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings `type` and `eventName` parameters. For more information
523
+ * about `eventName` query strings and parameters, see the list of event names for various applications above in `applicationName`.
524
+ */
525
+ eventName?: string;
526
+ /** Selector specifying which fields to include in a partial response. */
527
+ fields?: string;
528
+ /**
529
+ * The `filters` query string is a comma-separated list. The list is composed of event parameters that are manipulated by relational operators. Event parameters are in the form
530
+ * `parameter1 name[parameter1 value],parameter2 name[parameter2 value],...` These event parameters are associated with a specific `eventName`. An empty report is returned if the
531
+ * filtered request's parameter does not belong to the `eventName`. For more information about `eventName` parameters, see the list of event names for various applications above in
532
+ * `applicationName`. In the following Admin Activity example, the <> operator is URL-encoded in the request's query string (%3C%3E): GET...&eventName=CHANGE_CALENDAR_SETTING
533
+ * &filters=NEW_VALUE%3C%3EREAD_ONLY_ACCESS In the following Drive example, the list can be a view or edit event's `doc_id` parameter with a value that is manipulated by an 'equal
534
+ * to' (==) or 'not equal to' (<>) relational operator. In the first example, the report returns each edited document's `doc_id`. In the second example, the report returns each
535
+ * viewed document's `doc_id` that equals the value 12345 and does not return any viewed document's which have a `doc_id` value of 98765. The <> operator is URL-encoded in the
536
+ * request's query string (%3C%3E): GET...&eventName=edit&filters=doc_id GET...&eventName=view&filters=doc_id==12345,doc_id%3C%3E98765 The relational operators include: - `==` -
537
+ * 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<` - 'less than'. It is URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>`
538
+ * - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is URL-encoded (%3E=). *Note:* The API doesn't accept multiple values of a parameter. If a
539
+ * particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In addition, if an invalid request parameter
540
+ * is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. If no parameters are
541
+ * requested, all parameters are returned.
542
+ */
543
+ filters?: string;
544
+ /**
545
+ * Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of
546
+ * the group ids mentioned here. Format: "id:abc123,id:xyz456"
547
+ */
548
+ groupIdFilter?: string;
549
+ /** 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. */
550
+ key?: string;
551
+ /**
552
+ * Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two
553
+ * pages. The response's `nextPageToken` property has the token to the second page. The `maxResults` query string is optional in the request. The default value is 1000.
554
+ */
555
+ maxResults?: number;
556
+ /** OAuth 2.0 token for the current user. */
557
+ oauth_token?: string;
558
+ /**
559
+ * ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't
560
+ * appear in the filtered results.
561
+ */
562
+ orgUnitID?: string;
563
+ /**
564
+ * The token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter
565
+ * the `nextPageToken` value in the `pageToken` query string.
566
+ */
567
+ pageToken?: string;
568
+ /** Returns response with indentations and line breaks. */
569
+ prettyPrint?: boolean;
570
+ /** 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. */
571
+ quotaUser?: string;
572
+ /**
573
+ * Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from
574
+ * `startTime` until `endTime`. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an error.
575
+ */
576
+ startTime?: string;
577
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
578
+ upload_protocol?: string;
579
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
580
+ uploadType?: string;
581
+ /**
582
+ * Represents the profile ID or the user email for which the data should be filtered. Can be `all` for all information, or `userKey` for a user's unique Google Workspace profile ID
583
+ * or their primary email address. Must not be a deleted user. For a deleted user, call `users.list` in Directory API with `showDeleted=true`, then use the returned `ID` as the
584
+ * `userKey`.
585
+ */
586
+ userKey: string;
587
+ }): Request<Activities>;
588
+ /** Start receiving notifications for account activities. For more information, see Receiving Push Notifications. */
589
+ watch(request: {
590
+ /** V1 error format. */
591
+ "$.xgafv"?: string;
592
+ /** OAuth access token. */
593
+ access_token?: string;
594
+ /**
595
+ * The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity
596
+ * is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private
597
+ * network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
598
+ */
599
+ actorIpAddress?: string;
600
+ /** Data format for response. */
601
+ alt?: string;
602
+ /** Application name for which the events are to be retrieved. */
603
+ applicationName: string;
604
+ /** JSONP */
605
+ callback?: string;
606
+ /** The unique ID of the customer to retrieve data for. */
607
+ customerId?: string;
608
+ /**
609
+ * Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the
610
+ * API request. An API report has three basic time concepts: - *Date of the API's request for a report*: When the API created and retrieved the report. - *Report's start time*: The
611
+ * beginning of the timespan shown in the report. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an
612
+ * error. - *Report's end time*: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The
613
+ * report itself can be requested in August. If the `endTime` is not specified, the report returns all activities from the `startTime` until the current time or the most recent 180
614
+ * days if the `startTime` is more than 180 days in the past.
615
+ */
616
+ endTime?: string;
617
+ /**
618
+ * The name of the event being queried by the API. Each `eventName` is related to a specific Google Workspace service or feature which the API organizes into types of events. An
619
+ * example is the Google Calendar events in the Admin console application's reports. The Calendar Settings `type` structure has all of the Calendar `eventName` activities reported
620
+ * by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings `type` and `eventName` parameters. For more information
621
+ * about `eventName` query strings and parameters, see the list of event names for various applications above in `applicationName`.
622
+ */
623
+ eventName?: string;
624
+ /** Selector specifying which fields to include in a partial response. */
625
+ fields?: string;
626
+ /**
627
+ * The `filters` query string is a comma-separated list. The list is composed of event parameters that are manipulated by relational operators. Event parameters are in the form
628
+ * `parameter1 name[parameter1 value],parameter2 name[parameter2 value],...` These event parameters are associated with a specific `eventName`. An empty report is returned if the
629
+ * filtered request's parameter does not belong to the `eventName`. For more information about `eventName` parameters, see the list of event names for various applications above in
630
+ * `applicationName`. In the following Admin Activity example, the <> operator is URL-encoded in the request's query string (%3C%3E): GET...&eventName=CHANGE_CALENDAR_SETTING
631
+ * &filters=NEW_VALUE%3C%3EREAD_ONLY_ACCESS In the following Drive example, the list can be a view or edit event's `doc_id` parameter with a value that is manipulated by an 'equal
632
+ * to' (==) or 'not equal to' (<>) relational operator. In the first example, the report returns each edited document's `doc_id`. In the second example, the report returns each
633
+ * viewed document's `doc_id` that equals the value 12345 and does not return any viewed document's which have a `doc_id` value of 98765. The <> operator is URL-encoded in the
634
+ * request's query string (%3C%3E): GET...&eventName=edit&filters=doc_id GET...&eventName=view&filters=doc_id==12345,doc_id%3C%3E98765 The relational operators include: - `==` -
635
+ * 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<` - 'less than'. It is URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>`
636
+ * - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is URL-encoded (%3E=). *Note:* The API doesn't accept multiple values of a parameter. If a
637
+ * particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In addition, if an invalid request parameter
638
+ * is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. If no parameters are
639
+ * requested, all parameters are returned.
640
+ */
641
+ filters?: string;
642
+ /**
643
+ * Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of
644
+ * the group ids mentioned here. Format: "id:abc123,id:xyz456"
645
+ */
646
+ groupIdFilter?: string;
647
+ /** 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. */
648
+ key?: string;
649
+ /**
650
+ * Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two
651
+ * pages. The response's `nextPageToken` property has the token to the second page. The `maxResults` query string is optional in the request. The default value is 1000.
652
+ */
653
+ maxResults?: number;
654
+ /** OAuth 2.0 token for the current user. */
655
+ oauth_token?: string;
656
+ /**
657
+ * ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't
658
+ * appear in the filtered results.
659
+ */
660
+ orgUnitID?: string;
661
+ /**
662
+ * The token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter
663
+ * the `nextPageToken` value in the `pageToken` query string.
664
+ */
665
+ pageToken?: string;
666
+ /** Returns response with indentations and line breaks. */
667
+ prettyPrint?: boolean;
668
+ /** 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. */
669
+ quotaUser?: string;
670
+ /**
671
+ * Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from
672
+ * `startTime` until `endTime`. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an error.
673
+ */
674
+ startTime?: string;
675
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
676
+ upload_protocol?: string;
677
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
678
+ uploadType?: string;
679
+ /**
680
+ * Represents the profile ID or the user email for which the data should be filtered. Can be `all` for all information, or `userKey` for a user's unique Google Workspace profile ID
681
+ * or their primary email address. Must not be a deleted user. For a deleted user, call `users.list` in Directory API with `showDeleted=true`, then use the returned `ID` as the
682
+ * `userKey`.
683
+ */
684
+ userKey: string;
685
+ /** Request body */
686
+ resource: Channel;
687
+ }): Request<Channel>;
688
+ watch(request: {
689
+ /** V1 error format. */
690
+ "$.xgafv"?: string;
691
+ /** OAuth access token. */
692
+ access_token?: string;
693
+ /**
694
+ * The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity
695
+ * is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private
696
+ * network (VPN) address. This parameter supports both IPv4 and IPv6 address versions.
697
+ */
698
+ actorIpAddress?: string;
699
+ /** Data format for response. */
700
+ alt?: string;
701
+ /** Application name for which the events are to be retrieved. */
702
+ applicationName: string;
703
+ /** JSONP */
704
+ callback?: string;
705
+ /** The unique ID of the customer to retrieve data for. */
706
+ customerId?: string;
707
+ /**
708
+ * Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the
709
+ * API request. An API report has three basic time concepts: - *Date of the API's request for a report*: When the API created and retrieved the report. - *Report's start time*: The
710
+ * beginning of the timespan shown in the report. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an
711
+ * error. - *Report's end time*: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The
712
+ * report itself can be requested in August. If the `endTime` is not specified, the report returns all activities from the `startTime` until the current time or the most recent 180
713
+ * days if the `startTime` is more than 180 days in the past.
714
+ */
715
+ endTime?: string;
716
+ /**
717
+ * The name of the event being queried by the API. Each `eventName` is related to a specific Google Workspace service or feature which the API organizes into types of events. An
718
+ * example is the Google Calendar events in the Admin console application's reports. The Calendar Settings `type` structure has all of the Calendar `eventName` activities reported
719
+ * by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settings `type` and `eventName` parameters. For more information
720
+ * about `eventName` query strings and parameters, see the list of event names for various applications above in `applicationName`.
721
+ */
722
+ eventName?: string;
723
+ /** Selector specifying which fields to include in a partial response. */
724
+ fields?: string;
725
+ /**
726
+ * The `filters` query string is a comma-separated list. The list is composed of event parameters that are manipulated by relational operators. Event parameters are in the form
727
+ * `parameter1 name[parameter1 value],parameter2 name[parameter2 value],...` These event parameters are associated with a specific `eventName`. An empty report is returned if the
728
+ * filtered request's parameter does not belong to the `eventName`. For more information about `eventName` parameters, see the list of event names for various applications above in
729
+ * `applicationName`. In the following Admin Activity example, the <> operator is URL-encoded in the request's query string (%3C%3E): GET...&eventName=CHANGE_CALENDAR_SETTING
730
+ * &filters=NEW_VALUE%3C%3EREAD_ONLY_ACCESS In the following Drive example, the list can be a view or edit event's `doc_id` parameter with a value that is manipulated by an 'equal
731
+ * to' (==) or 'not equal to' (<>) relational operator. In the first example, the report returns each edited document's `doc_id`. In the second example, the report returns each
732
+ * viewed document's `doc_id` that equals the value 12345 and does not return any viewed document's which have a `doc_id` value of 98765. The <> operator is URL-encoded in the
733
+ * request's query string (%3C%3E): GET...&eventName=edit&filters=doc_id GET...&eventName=view&filters=doc_id==12345,doc_id%3C%3E98765 The relational operators include: - `==` -
734
+ * 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<` - 'less than'. It is URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>`
735
+ * - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is URL-encoded (%3E=). *Note:* The API doesn't accept multiple values of a parameter. If a
736
+ * particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In addition, if an invalid request parameter
737
+ * is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. If no parameters are
738
+ * requested, all parameters are returned.
739
+ */
740
+ filters?: string;
741
+ /**
742
+ * Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of
743
+ * the group ids mentioned here. Format: "id:abc123,id:xyz456"
744
+ */
745
+ groupIdFilter?: string;
746
+ /** 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. */
747
+ key?: string;
748
+ /**
749
+ * Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two
750
+ * pages. The response's `nextPageToken` property has the token to the second page. The `maxResults` query string is optional in the request. The default value is 1000.
751
+ */
752
+ maxResults?: number;
753
+ /** OAuth 2.0 token for the current user. */
754
+ oauth_token?: string;
755
+ /**
756
+ * ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't
757
+ * appear in the filtered results.
758
+ */
759
+ orgUnitID?: string;
760
+ /**
761
+ * The token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter
762
+ * the `nextPageToken` value in the `pageToken` query string.
763
+ */
764
+ pageToken?: string;
765
+ /** Returns response with indentations and line breaks. */
766
+ prettyPrint?: boolean;
767
+ /** 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. */
768
+ quotaUser?: string;
769
+ /**
770
+ * Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities from
771
+ * `startTime` until `endTime`. The `startTime` must be before the `endTime` (if specified) and the current time when the request is made, or the API returns an error.
772
+ */
773
+ startTime?: string;
774
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
775
+ upload_protocol?: string;
776
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
777
+ uploadType?: string;
778
+ /**
779
+ * Represents the profile ID or the user email for which the data should be filtered. Can be `all` for all information, or `userKey` for a user's unique Google Workspace profile ID
780
+ * or their primary email address. Must not be a deleted user. For a deleted user, call `users.list` in Directory API with `showDeleted=true`, then use the returned `ID` as the
781
+ * `userKey`.
782
+ */
783
+ userKey: string;
784
+ },
785
+ body: Channel): Request<Channel>;
786
+ }
787
+ interface CustomerUsageReportsResource {
788
+ /**
789
+ * Retrieves a report which is a collection of properties and statistics for a specific customer's account. For more information, see the Customers Usage Report guide. For more
790
+ * information about the customer report's parameters, see the Customers Usage parameters reference guides.
791
+ */
792
+ get(request?: {
793
+ /** V1 error format. */
794
+ "$.xgafv"?: string;
795
+ /** OAuth access token. */
796
+ access_token?: string;
797
+ /** Data format for response. */
798
+ alt?: string;
799
+ /** JSONP */
800
+ callback?: string;
801
+ /** The unique ID of the customer to retrieve data for. */
802
+ customerId?: string;
803
+ /** Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this. */
804
+ date: string;
805
+ /** Selector specifying which fields to include in a partial response. */
806
+ fields?: string;
807
+ /** 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. */
808
+ key?: string;
809
+ /** OAuth 2.0 token for the current user. */
810
+ oauth_token?: string;
811
+ /**
812
+ * Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. For your follow-on requests getting all of the report's pages, enter the
813
+ * `nextPageToken` value in the `pageToken` query string.
814
+ */
815
+ pageToken?: string;
816
+ /**
817
+ * The `parameters` query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The
818
+ * application values for the Customers usage report include `accounts`, `app_maker`, `apps_scripts`, `calendar`, `classroom`, `cros`, `docs`, `gmail`, `gplus`,
819
+ * `device_management`, `meet`, and `sites`. A `parameters` query string is in the CSV form of `app_name1:param_name1, app_name2:param_name2`. *Note:* The API doesn't accept
820
+ * multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In
821
+ * addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid
822
+ * request parameters. An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
823
+ */
824
+ parameters?: string;
825
+ /** Returns response with indentations and line breaks. */
826
+ prettyPrint?: boolean;
827
+ /** 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. */
828
+ quotaUser?: string;
829
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
830
+ upload_protocol?: string;
831
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
832
+ uploadType?: string;
833
+ }): Request<UsageReports>;
834
+ }
835
+ interface EntityUsageReportsResource {
836
+ /**
837
+ * Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For
838
+ * more information about the entities report's parameters, see the Entities Usage parameters reference guides.
839
+ */
840
+ get(request?: {
841
+ /** V1 error format. */
842
+ "$.xgafv"?: string;
843
+ /** OAuth access token. */
844
+ access_token?: string;
845
+ /** Data format for response. */
846
+ alt?: string;
847
+ /** JSONP */
848
+ callback?: string;
849
+ /** The unique ID of the customer to retrieve data for. */
850
+ customerId?: string;
851
+ /** Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this. */
852
+ date: string;
853
+ /**
854
+ * Represents the key of the object to filter the data with. It is a string which can take the value `all` to get activity events for all users, or any other value for an
855
+ * app-specific entity. For details on how to obtain the `entityKey` for a particular `entityType`, see the Entities Usage parameters reference guides.
856
+ */
857
+ entityKey: string;
858
+ /** Represents the type of entity for the report. */
859
+ entityType: string;
860
+ /** Selector specifying which fields to include in a partial response. */
861
+ fields?: string;
862
+ /**
863
+ * The `filters` query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. The `filters`
864
+ * query string includes the name of the application whose usage is returned in the report. The application values for the Entities usage report include `accounts`, `docs`, and
865
+ * `gmail`. Filters are in the form `[application name]:parameter name[parameter value],...`. In this example, the `<>` 'not equal to' operator is URL-encoded in the request's
866
+ * query string (%3C%3E): GET https://www.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-01 ?parameters=gplus:community_name,gplus:num_total_members
867
+ * &filters=gplus:num_total_members%3C%3E0 The relational operators include: - `==` - 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<` - 'less than'. It is
868
+ * URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>` - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is
869
+ * URL-encoded (%3E=). Filters can only be applied to numeric parameters.
870
+ */
871
+ filters?: string;
872
+ /** 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. */
873
+ key?: string;
874
+ /**
875
+ * Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two
876
+ * pages. The response's `nextPageToken` property has the token to the second page.
877
+ */
878
+ maxResults?: number;
879
+ /** OAuth 2.0 token for the current user. */
880
+ oauth_token?: string;
881
+ /**
882
+ * Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter the
883
+ * `nextPageToken` value in the `pageToken` query string.
884
+ */
885
+ pageToken?: string;
886
+ /**
887
+ * The `parameters` query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The
888
+ * application values for the Entities usage report are only `gplus`. A `parameter` query string is in the CSV form of `[app_name1:param_name1], [app_name2:param_name2]...`.
889
+ * *Note:* The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of
890
+ * that request parameter. In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response
891
+ * corresponding to the remaining valid request parameters. An example of an invalid request parameter is one that does not belong to the application. If no parameters are
892
+ * requested, all parameters are returned.
893
+ */
894
+ parameters?: string;
895
+ /** Returns response with indentations and line breaks. */
896
+ prettyPrint?: boolean;
897
+ /** 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. */
898
+ quotaUser?: string;
899
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
900
+ upload_protocol?: string;
901
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
902
+ uploadType?: string;
903
+ }): Request<UsageReports>;
904
+ }
905
+ interface UserUsageReportResource {
906
+ /**
907
+ * Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide. For more
908
+ * information about the user report's parameters, see the Users Usage parameters reference guides.
909
+ */
910
+ get(request?: {
911
+ /** V1 error format. */
912
+ "$.xgafv"?: string;
913
+ /** OAuth access token. */
914
+ access_token?: string;
915
+ /** Data format for response. */
916
+ alt?: string;
917
+ /** JSONP */
918
+ callback?: string;
919
+ /** The unique ID of the customer to retrieve data for. */
920
+ customerId?: string;
921
+ /** Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this. */
922
+ date: string;
923
+ /** Selector specifying which fields to include in a partial response. */
924
+ fields?: string;
925
+ /**
926
+ * The `filters` query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. The `filters`
927
+ * query string includes the name of the application whose usage is returned in the report. The application values for the Users Usage Report include `accounts`, `docs`, and
928
+ * `gmail`. Filters are in the form `[application name]:parameter name[parameter value],...`. In this example, the `<>` 'not equal to' operator is URL-encoded in the request's
929
+ * query string (%3C%3E): GET https://www.googleapis.com/admin/reports/v1/usage/users/all/dates/2013-03-03 ?parameters=accounts:last_login_time
930
+ * &filters=accounts:last_login_time%3C%3E2010-10-28T10:26:35.000Z The relational operators include: - `==` - 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<`
931
+ * - 'less than'. It is URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>` - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or
932
+ * equal to'. It is URL-encoded (%3E=).
933
+ */
934
+ filters?: string;
935
+ /**
936
+ * Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of
937
+ * the group ids mentioned here. Format: "id:abc123,id:xyz456"
938
+ */
939
+ groupIdFilter?: string;
940
+ /** 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. */
941
+ key?: string;
942
+ /**
943
+ * Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two
944
+ * pages. The response's `nextPageToken` property has the token to the second page. The `maxResults` query string is optional.
945
+ */
946
+ maxResults?: number;
947
+ /** OAuth 2.0 token for the current user. */
948
+ oauth_token?: string;
949
+ /**
950
+ * ID of the organizational unit to report on. User activity will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear
951
+ * in the filtered results.
952
+ */
953
+ orgUnitID?: string;
954
+ /**
955
+ * Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter the
956
+ * `nextPageToken` value in the `pageToken` query string.
957
+ */
958
+ pageToken?: string;
959
+ /**
960
+ * The `parameters` query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The
961
+ * application values for the Customers Usage report include `accounts`, `app_maker`, `apps_scripts`, `calendar`, `classroom`, `cros`, `docs`, `gmail`, `gplus`,
962
+ * `device_management`, `meet`, and `sites`. A `parameters` query string is in the CSV form of `app_name1:param_name1, app_name2:param_name2`. *Note:* The API doesn't accept
963
+ * multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In
964
+ * addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid
965
+ * request parameters. An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
966
+ */
967
+ parameters?: string;
968
+ /** Returns response with indentations and line breaks. */
969
+ prettyPrint?: boolean;
970
+ /** 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. */
971
+ quotaUser?: string;
972
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
973
+ upload_protocol?: string;
974
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
975
+ uploadType?: string;
976
+ /**
977
+ * Represents the profile ID or the user email for which the data should be filtered. Can be `all` for all information, or `userKey` for a user's unique Google Workspace profile ID
978
+ * or their primary email address. Must not be a deleted user. For a deleted user, call `users.list` in Directory API with `showDeleted=true`, then use the returned `ID` as the
979
+ * `userKey`.
980
+ */
981
+ userKey: string;
982
+ }): Request<UsageReports>;
983
+ }
984
+
985
+ const activities: ActivitiesResource;
986
+
987
+ const customerUsageReports: CustomerUsageReportsResource;
988
+
989
+ const entityUsageReports: EntityUsageReportsResource;
990
+
991
+ const userUsageReport: UserUsageReportResource;
992
+ }
993
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.admin-reports_v1",
3
+ "version": "0.0.20220809",
4
+ "description": "TypeScript typings for Admin SDK API reports_v1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,103 @@
1
+ # TypeScript typings for Admin SDK API reports_v1
2
+
3
+ Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.
4
+ For detailed description please check [documentation](https://developers.google.com/admin-sdk/).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Admin SDK API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.admin-reports_v1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://admin.googleapis.com/$discovery/rest?version=reports_v1', () => {
29
+ // now we can use:
30
+ // gapi.client.admin
31
+ // gapi.client.reports
32
+ });
33
+ ```
34
+
35
+ ```typescript
36
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
37
+ gapi.client.load('admin', 'reports_v1', () => {
38
+ // now we can use:
39
+ // gapi.client.admin
40
+ // gapi.client.reports
41
+ });
42
+ ```
43
+
44
+ Don't forget to authenticate your client before sending any request to resources:
45
+
46
+ ```typescript
47
+ // declare client_id registered in Google Developers Console
48
+ var client_id = '',
49
+ scope = [
50
+ // View audit reports for your G Suite domain
51
+ 'https://www.googleapis.com/auth/admin.reports.audit.readonly',
52
+
53
+ // View usage reports for your G Suite domain
54
+ 'https://www.googleapis.com/auth/admin.reports.usage.readonly',
55
+ ],
56
+ immediate = true;
57
+ // ...
58
+
59
+ gapi.auth.authorize(
60
+ { client_id: client_id, scope: scope, immediate: immediate },
61
+ authResult => {
62
+ if (authResult && !authResult.error) {
63
+ /* handle successful authorization */
64
+ } else {
65
+ /* handle authorization error */
66
+ }
67
+ });
68
+ ```
69
+
70
+ After that you can use Admin SDK API resources: <!-- TODO: make this work for multiple namespaces -->
71
+
72
+ ```typescript
73
+
74
+ /*
75
+ Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
76
+ */
77
+ await gapi.client.reports.activities.list({ applicationName: "applicationName", userKey: "userKey", });
78
+
79
+ /*
80
+ Start receiving notifications for account activities. For more information, see Receiving Push Notifications.
81
+ */
82
+ await gapi.client.reports.activities.watch({ applicationName: "applicationName", userKey: "userKey", });
83
+
84
+ /*
85
+ Stop watching resources through this channel.
86
+ */
87
+ await gapi.client.admin.channels.stop({ });
88
+
89
+ /*
90
+ Retrieves a report which is a collection of properties and statistics for a specific customer's account. For more information, see the Customers Usage Report guide. For more information about the customer report's parameters, see the Customers Usage parameters reference guides.
91
+ */
92
+ await gapi.client.reports.customerUsageReports.get({ date: "date", });
93
+
94
+ /*
95
+ Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more information about the entities report's parameters, see the Entities Usage parameters reference guides.
96
+ */
97
+ await gapi.client.reports.entityUsageReports.get({ date: "date", entityKey: "entityKey", entityType: "entityType", });
98
+
99
+ /*
100
+ Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide. For more information about the user report's parameters, see the Users Usage parameters reference guides.
101
+ */
102
+ await gapi.client.reports.userUsageReport.get({ date: "date", userKey: "userKey", });
103
+ ```
package/tests.ts ADDED
@@ -0,0 +1,136 @@
1
+ /* This is stub file for gapi.client.admin-reports_v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220809
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://admin.googleapis.com/$discovery/rest?version=reports_v1');
12
+ /** now we can use gapi.client.admin, gapi.client.reports */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** View audit reports for your G Suite domain */
19
+ 'https://www.googleapis.com/auth/admin.reports.audit.readonly',
20
+ /** View usage reports for your G Suite domain */
21
+ 'https://www.googleapis.com/auth/admin.reports.usage.readonly',
22
+ ];
23
+ const immediate = false;
24
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
25
+ if (authResult && !authResult.error) {
26
+ /** handle successful authorization */
27
+ run();
28
+ } else {
29
+ /** handle authorization error */
30
+ }
31
+ });
32
+
33
+ async function run() {
34
+ /** Stop watching resources through this channel. */
35
+ await gapi.client.admin.channels.stop({
36
+ }, {
37
+ address: "Test string",
38
+ expiration: "Test string",
39
+ id: "Test string",
40
+ kind: "Test string",
41
+ params: {
42
+ A: "Test string"
43
+ },
44
+ payload: true,
45
+ resourceId: "Test string",
46
+ resourceUri: "Test string",
47
+ token: "Test string",
48
+ type: "Test string",
49
+ });
50
+ /**
51
+ * Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the
52
+ * guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
53
+ */
54
+ await gapi.client.reports.activities.list({
55
+ actorIpAddress: "Test string",
56
+ applicationName: "Test string",
57
+ customerId: "Test string",
58
+ endTime: "Test string",
59
+ eventName: "Test string",
60
+ filters: "Test string",
61
+ groupIdFilter: "Test string",
62
+ maxResults: 42,
63
+ orgUnitID: "Test string",
64
+ pageToken: "Test string",
65
+ startTime: "Test string",
66
+ userKey: "Test string",
67
+ });
68
+ /** Start receiving notifications for account activities. For more information, see Receiving Push Notifications. */
69
+ await gapi.client.reports.activities.watch({
70
+ actorIpAddress: "Test string",
71
+ applicationName: "Test string",
72
+ customerId: "Test string",
73
+ endTime: "Test string",
74
+ eventName: "Test string",
75
+ filters: "Test string",
76
+ groupIdFilter: "Test string",
77
+ maxResults: 42,
78
+ orgUnitID: "Test string",
79
+ pageToken: "Test string",
80
+ startTime: "Test string",
81
+ userKey: "Test string",
82
+ }, {
83
+ address: "Test string",
84
+ expiration: "Test string",
85
+ id: "Test string",
86
+ kind: "Test string",
87
+ params: {
88
+ A: "Test string"
89
+ },
90
+ payload: true,
91
+ resourceId: "Test string",
92
+ resourceUri: "Test string",
93
+ token: "Test string",
94
+ type: "Test string",
95
+ });
96
+ /**
97
+ * Retrieves a report which is a collection of properties and statistics for a specific customer's account. For more information, see the Customers Usage Report guide. For more information
98
+ * about the customer report's parameters, see the Customers Usage parameters reference guides.
99
+ */
100
+ await gapi.client.reports.customerUsageReports.get({
101
+ customerId: "Test string",
102
+ date: "Test string",
103
+ pageToken: "Test string",
104
+ parameters: "Test string",
105
+ });
106
+ /**
107
+ * Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more
108
+ * information about the entities report's parameters, see the Entities Usage parameters reference guides.
109
+ */
110
+ await gapi.client.reports.entityUsageReports.get({
111
+ customerId: "Test string",
112
+ date: "Test string",
113
+ entityKey: "Test string",
114
+ entityType: "Test string",
115
+ filters: "Test string",
116
+ maxResults: 42,
117
+ pageToken: "Test string",
118
+ parameters: "Test string",
119
+ });
120
+ /**
121
+ * Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide. For more information
122
+ * about the user report's parameters, see the Users Usage parameters reference guides.
123
+ */
124
+ await gapi.client.reports.userUsageReport.get({
125
+ customerId: "Test string",
126
+ date: "Test string",
127
+ filters: "Test string",
128
+ groupIdFilter: "Test string",
129
+ maxResults: 42,
130
+ orgUnitID: "Test string",
131
+ pageToken: "Test string",
132
+ parameters: "Test string",
133
+ userKey: "Test string",
134
+ });
135
+ }
136
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }