@maxim_mazurok/gapi.client.driveactivity-v2 0.0.20231122 → 0.0.20231128

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 CHANGED
@@ -9,709 +9,500 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://driveactivity.googleapis.com/$discovery/rest?version=v2
12
- // Revision: 20231122
12
+ // Revision: 20231128
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
16
16
  declare namespace gapi.client {
17
- /** Load Drive Activity API v2 */
18
- function load(urlOrObject: "https://driveactivity.googleapis.com/$discovery/rest?version=v2"): Promise<void>;
19
- /** @deprecated Please load APIs with discovery documents. */
20
- function load(name: "driveactivity", version: "v2"): Promise<void>;
21
- /** @deprecated Please load APIs with discovery documents. */
22
- function load(name: "driveactivity", version: "v2", callback: () => any): void;
17
+ /** Load Drive Activity API v2 */
18
+ function load(
19
+ urlOrObject: 'https://driveactivity.googleapis.com/$discovery/rest?version=v2'
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'driveactivity', version: 'v2'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(
25
+ name: 'driveactivity',
26
+ version: 'v2',
27
+ callback: () => any
28
+ ): void;
23
29
 
24
- namespace driveactivity {
25
- interface Action {
26
- /** The actor responsible for this action (or empty if all actors are responsible). */
27
- actor?:
28
- Actor;
29
- /** The type and detailed information about the action. */
30
- detail?:
31
- ActionDetail;
32
- /** The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred. */
33
- target?:
34
- Target;
35
- /** The action occurred over this time range. */
36
- timeRange?:
37
- TimeRange;
38
- /** The action occurred at this specific time. */
39
- timestamp?:
40
- string;
41
- }
42
- interface ActionDetail {
43
- /** Label was changed. */
44
- appliedLabelChange?:
45
- AppliedLabelChange;
46
- /** A change about comments was made. */
47
- comment?:
48
- Comment;
49
- /** An object was created. */
50
- create?:
51
- Create;
52
- /** An object was deleted. */
53
- delete?:
54
- Delete;
55
- /** A change happened in data leak prevention status. */
56
- dlpChange?:
57
- DataLeakPreventionChange;
58
- /** An object was edited. */
59
- edit?:
60
- any;
61
- /** An object was moved. */
62
- move?:
63
- Move;
64
- /** The permission on an object was changed. */
65
- permissionChange?:
66
- PermissionChange;
67
- /** An object was referenced in an application outside of Drive/Docs. */
68
- reference?:
69
- ApplicationReference;
70
- /** An object was renamed. */
71
- rename?:
72
- Rename;
73
- /** A deleted object was restored. */
74
- restore?:
75
- Restore;
76
- /** Settings were changed. */
77
- settingsChange?:
78
- SettingsChange;
79
- }
80
- interface Actor {
81
- /** An administrator. */
82
- administrator?:
83
- any;
84
- /** An anonymous user. */
85
- anonymous?:
86
- any;
87
- /** An account acting on behalf of another. */
88
- impersonation?:
89
- Impersonation;
90
- /** A non-user actor (i.e. system triggered). */
91
- system?:
92
- SystemEvent;
93
- /** An end user. */
94
- user?:
95
- User;
96
- }
97
- // tslint:disable-next-line:no-empty-interface
98
- interface Administrator {
99
- }
100
- // tslint:disable-next-line:no-empty-interface
101
- interface AnonymousUser {
102
- }
103
- // tslint:disable-next-line:no-empty-interface
104
- interface Anyone {
105
- }
106
- interface ApplicationReference {
107
- /** The reference type corresponding to this event. */
108
- type?:
109
- string;
110
- }
111
- interface AppliedLabelChange {
112
- /** Changes that were made to the Label on the Target. */
113
- changes?:
114
- AppliedLabelChangeDetail[];
115
- }
116
- interface AppliedLabelChangeDetail {
117
- /** Field Changes. Only present if `types` contains `LABEL_FIELD_VALUE_CHANGED`. */
118
- fieldChanges?:
119
- FieldValueChange[];
120
- /** The Label name representing the Label that changed. This name always contains the revision of the Label that was used when this Action occurred. The format is `labels/id@revision`. */
121
- label?:
122
- string;
123
- /** The human-readable title of the label that changed. */
124
- title?:
125
- string;
126
- /** The types of changes made to the Label on the Target. */
127
- types?:
128
- string[];
129
- }
130
- interface Assignment {
131
- /** The user to whom the comment was assigned. */
132
- assignedUser?:
133
- User;
134
- /** The sub-type of this event. */
135
- subtype?:
136
- string;
137
- }
138
- interface Comment {
139
- /** A change on an assignment. */
140
- assignment?:
141
- Assignment;
142
- /** Users who are mentioned in this comment. */
143
- mentionedUsers?:
144
- User[];
145
- /** A change on a regular posted comment. */
146
- post?:
147
- Post;
148
- /** A change on a suggestion. */
149
- suggestion?:
150
- Suggestion;
151
- }
152
- interface ConsolidationStrategy {
153
- /** The individual activities are consolidated using the legacy strategy. */
154
- legacy?:
155
- any;
156
- /** The individual activities are not consolidated. */
157
- none?:
158
- any;
159
- }
160
- interface Copy {
161
- /** The original object. */
162
- originalObject?:
163
- TargetReference;
164
- }
165
- interface Create {
166
- /** If present, indicates the object was created by copying an existing Drive object. */
167
- copy?:
168
- Copy;
169
- /** If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object. */
170
- new?:
171
- any;
172
- /** If present, indicates the object originated externally and was uploaded to Drive. */
173
- upload?:
174
- any;
175
- }
176
- interface DataLeakPreventionChange {
177
- /** The type of Data Leak Prevention (DLP) change. */
178
- type?:
179
- string;
180
- }
181
- interface Date {
182
- /** Date value. */
183
- value?:
184
- string;
185
- }
186
- interface Delete {
187
- /** The type of delete action taken. */
188
- type?:
189
- string;
190
- }
191
- // tslint:disable-next-line:no-empty-interface
192
- interface DeletedUser {
193
- }
194
- interface Domain {
195
- /** An opaque string used to identify this domain. */
196
- legacyId?:
197
- string;
198
- /** The name of the domain, e.g. `google.com`. */
199
- name?:
200
- string;
201
- }
202
- interface Drive {
203
- /** The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */
204
- name?:
205
- string;
206
- /** The root of this shared drive. */
207
- root?:
208
- DriveItem;
209
- /** The title of the shared drive. */
210
- title?:
211
- string;
212
- }
213
- interface DriveActivity {
214
- /** Details on all actions in this activity. */
215
- actions?:
216
- Action[];
217
- /** All actor(s) responsible for the activity. */
218
- actors?:
219
- Actor[];
220
- /**
221
- * Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the
222
- * ConsolidationStrategy in the request.
223
- */
224
- primaryActionDetail?:
225
- ActionDetail;
226
- /** All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred. */
227
- targets?:
228
- Target[];
229
- /** The activity occurred over this time range. */
230
- timeRange?:
231
- TimeRange;
232
- /** The activity occurred at this specific time. */
233
- timestamp?:
234
- string;
235
- }
236
- // tslint:disable-next-line:no-empty-interface
237
- interface DriveFile {
238
- }
239
- interface DriveFolder {
240
- /** The type of Drive folder. */
241
- type?:
242
- string;
243
- }
244
- interface DriveItem {
245
- /** The Drive item is a file. */
246
- driveFile?:
247
- any;
248
- /** The Drive item is a folder. Includes information about the type of folder. */
249
- driveFolder?:
250
- DriveFolder;
251
- /** This field is deprecated; please use the `driveFile` field instead. */
252
- file?:
253
- any;
254
- /** This field is deprecated; please use the `driveFolder` field instead. */
255
- folder?:
256
- Folder;
257
- /** The MIME type of the Drive item. See https://developers.google.com/drive/v3/web/mime-types. */
258
- mimeType?:
259
- string;
260
- /** The target Drive item. The format is `items/ITEM_ID`. */
261
- name?:
262
- string;
263
- /** Information about the owner of this Drive item. */
264
- owner?:
265
- Owner;
266
- /** The title of the Drive item. */
267
- title?:
268
- string;
269
- }
270
- interface DriveItemReference {
271
- /** The Drive item is a file. */
272
- driveFile?:
273
- any;
274
- /** The Drive item is a folder. Includes information about the type of folder. */
275
- driveFolder?:
276
- DriveFolder;
277
- /** This field is deprecated; please use the `driveFile` field instead. */
278
- file?:
279
- any;
280
- /** This field is deprecated; please use the `driveFolder` field instead. */
281
- folder?:
282
- Folder;
283
- /** The target Drive item. The format is `items/ITEM_ID`. */
284
- name?:
285
- string;
286
- /** The title of the Drive item. */
287
- title?:
288
- string;
289
- }
290
- interface DriveReference {
291
- /** The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */
292
- name?:
293
- string;
294
- /** The title of the shared drive. */
295
- title?:
296
- string;
297
- }
298
- // tslint:disable-next-line:no-empty-interface
299
- interface Edit {
300
- }
301
- interface FieldValue {
302
- /** Date Field value. */
303
- date?:
304
- Date;
305
- /** Integer Field value. */
306
- integer?:
307
- Integer;
308
- /** Selection Field value. */
309
- selection?:
310
- Selection;
311
- /** Selection List Field value. */
312
- selectionList?:
313
- SelectionList;
314
- /** Text Field value. */
315
- text?:
316
- Text;
317
- /** Text List Field value. */
318
- textList?:
319
- TextList;
320
- /** User Field value. */
321
- user?:
322
- SingleUser;
323
- /** User List Field value. */
324
- userList?:
325
- UserList;
326
- }
327
- interface FieldValueChange {
328
- /** The human-readable display name for this field. */
329
- displayName?:
330
- string;
331
- /** The ID of this field. Field IDs are unique within a Label. */
332
- fieldId?:
333
- string;
334
- /** The value that is now set on the field. If not present, the field was cleared. At least one of {old_value|new_value} is always set. */
335
- newValue?:
336
- FieldValue;
337
- /** The value that was previously set on the field. If not present, the field was newly set. At least one of {old_value|new_value} is always set. */
338
- oldValue?:
339
- FieldValue;
340
- }
341
- // tslint:disable-next-line:no-empty-interface
342
- interface File {
343
- }
344
- interface FileComment {
345
- /** The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https://developers.google.com/drive/v3/reference/comments/get */
346
- legacyCommentId?:
347
- string;
348
- /**
349
- * The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see
350
- * https://developers.google.com/drive/v3/reference/comments/get
351
- */
352
- legacyDiscussionId?:
353
- string;
354
- /** The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`. */
355
- linkToDiscussion?:
356
- string;
357
- /** The Drive item containing this comment. */
358
- parent?:
359
- DriveItem;
360
- }
361
- interface Folder {
362
- /** This field is deprecated; please see `DriveFolder.type` instead. */
363
- type?:
364
- string;
365
- }
366
- interface Group {
367
- /** The email address of the group. */
368
- email?:
369
- string;
370
- /** The title of the group. */
371
- title?:
372
- string;
373
- }
374
- interface Impersonation {
375
- /** The impersonated user. */
376
- impersonatedUser?:
377
- User;
378
- }
379
- interface Integer {
380
- /** Integer value. */
381
- value?:
382
- string;
383
- }
384
- interface KnownUser {
385
- /** True if this is the user making the request. */
386
- isCurrentUser?:
387
- boolean;
388
- /** The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/. */
389
- personName?:
390
- string;
391
- }
392
- // tslint:disable-next-line:no-empty-interface
393
- interface Legacy {
394
- }
395
- interface Move {
396
- /** The added parent object(s). */
397
- addedParents?:
398
- TargetReference[];
399
- /** The removed parent object(s). */
400
- removedParents?:
401
- TargetReference[];
402
- }
403
- // tslint:disable-next-line:no-empty-interface
404
- interface New {
405
- }
406
- // tslint:disable-next-line:no-empty-interface
407
- interface NoConsolidation {
408
- }
409
- interface Owner {
410
- /** The domain of the Drive item owner. */
411
- domain?:
412
- Domain;
413
- /** The drive that owns the item. */
414
- drive?:
415
- DriveReference;
416
- /** This field is deprecated; please use the `drive` field instead. */
417
- teamDrive?:
418
- TeamDriveReference;
419
- /** The user that owns the Drive item. */
420
- user?:
421
- User;
422
- }
423
- interface Permission {
424
- /** If true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item. */
425
- allowDiscovery?:
426
- boolean;
427
- /** If set, this permission applies to anyone, even logged out users. */
428
- anyone?:
429
- any;
430
- /** The domain to whom this permission applies. */
431
- domain?:
432
- Domain;
433
- /** The group to whom this permission applies. */
434
- group?:
435
- Group;
436
- /**
437
- * Indicates the [Google Drive permissions role](https://developers.google.com/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on
438
- * items.
439
- */
440
- role?:
441
- string;
442
- /** The user to whom this permission applies. */
443
- user?:
444
- User;
445
- }
446
- interface PermissionChange {
447
- /** The set of permissions added by this change. */
448
- addedPermissions?:
449
- Permission[];
450
- /** The set of permissions removed by this change. */
451
- removedPermissions?:
452
- Permission[];
453
- }
454
- interface Post {
455
- /** The sub-type of this event. */
456
- subtype?:
457
- string;
458
- }
459
- interface QueryDriveActivityRequest {
460
- /** Return activities for this Drive folder, plus all children and descendants. The format is `items/ITEM_ID`. */
461
- ancestorName?:
462
- string;
463
- /** Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated. */
464
- consolidationStrategy?:
465
- ConsolidationStrategy;
466
- /**
467
- * The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the
468
- * form "field operator value". Supported fields: - `time`: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: -
469
- * `time > 1452409200000 AND time <= 1492812924310` - `time >= "2016-01-10T01:02:03-05:00"` - `detail.action_detail_case`: Uses the "has" operator (:) and either a singular value or a
470
- * list of allowed action types enclosed in parentheses, separated by a space. To exclude a result from the response, prepend a hyphen (`-`) to the beginning of the filter string.
471
- * Examples: - `detail.action_detail_case:RENAME` - `detail.action_detail_case:(CREATE RESTORE)` - `-detail.action_detail_case:MOVE`
472
- */
473
- filter?:
474
- string;
475
- /** Return activities for this Drive item. The format is `items/ITEM_ID`. */
476
- itemName?:
477
- string;
478
- /**
479
- * The minimum number of activities desired in the response; the server attempts to return at least this quantity. The server may also return fewer activities if it has a partial
480
- * response ready before the request times out. If not set, a default value is used.
481
- */
482
- pageSize?:
483
- number;
484
- /**
485
- * The token identifies which page of results to return. Set this to the next_page_token value returned from a previous query to obtain the following page of results. If not set, the
486
- * first page of results is returned.
487
- */
488
- pageToken?:
489
- string;
490
- }
491
- interface QueryDriveActivityResponse {
492
- /** List of activity requested. */
493
- activities?:
494
- DriveActivity[];
495
- /** Token to retrieve the next page of results, or empty if there are no more results in the list. */
496
- nextPageToken?:
497
- string;
498
- }
499
- interface Rename {
500
- /** The new title of the drive object. */
501
- newTitle?:
502
- string;
503
- /** The previous title of the drive object. */
504
- oldTitle?:
505
- string;
506
- }
507
- interface Restore {
508
- /** The type of restore action taken. */
509
- type?:
510
- string;
511
- }
512
- interface RestrictionChange {
513
- /** The feature which had a change in restriction policy. */
514
- feature?:
515
- string;
516
- /** The restriction in place after the change. */
517
- newRestriction?:
518
- string;
519
- }
520
- interface Selection {
521
- /** Selection value as human-readable display string. */
522
- displayName?:
523
- string;
524
- /** Selection value as Field Choice ID. */
525
- value?:
526
- string;
527
- }
528
- interface SelectionList {
529
- /** Selection values. */
530
- values?:
531
- Selection[];
532
- }
533
- interface SettingsChange {
534
- /** The set of changes made to restrictions. */
535
- restrictionChanges?:
536
- RestrictionChange[];
537
- }
538
- interface SingleUser {
539
- /** User value as email. */
540
- value?:
541
- string;
542
- }
543
- interface Suggestion {
544
- /** The sub-type of this event. */
545
- subtype?:
546
- string;
547
- }
548
- interface SystemEvent {
549
- /** The type of the system event that may triggered activity. */
550
- type?:
551
- string;
552
- }
553
- interface Target {
554
- /** The target is a shared drive. */
555
- drive?:
556
- Drive;
557
- /** The target is a Drive item. */
558
- driveItem?:
559
- DriveItem;
560
- /** The target is a comment on a Drive file. */
561
- fileComment?:
562
- FileComment;
563
- /** This field is deprecated; please use the `drive` field instead. */
564
- teamDrive?:
565
- TeamDrive;
566
- }
567
- interface TargetReference {
568
- /** The target is a shared drive. */
569
- drive?:
570
- DriveReference;
571
- /** The target is a Drive item. */
572
- driveItem?:
573
- DriveItemReference;
574
- /** This field is deprecated; please use the `drive` field instead. */
575
- teamDrive?:
576
- TeamDriveReference;
577
- }
578
- interface TeamDrive {
579
- /** This field is deprecated; please see `Drive.name` instead. */
580
- name?:
581
- string;
582
- /** This field is deprecated; please see `Drive.root` instead. */
583
- root?:
584
- DriveItem;
585
- /** This field is deprecated; please see `Drive.title` instead. */
586
- title?:
587
- string;
588
- }
589
- interface TeamDriveReference {
590
- /** This field is deprecated; please see `DriveReference.name` instead. */
591
- name?:
592
- string;
593
- /** This field is deprecated; please see `DriveReference.title` instead. */
594
- title?:
595
- string;
596
- }
597
- interface Text {
598
- /** Value of Text Field. */
599
- value?:
600
- string;
601
- }
602
- interface TextList {
603
- /** Text values. */
604
- values?:
605
- Text[];
606
- }
607
- interface TimeRange {
608
- /** The end of the time range. */
609
- endTime?:
610
- string;
611
- /** The start of the time range. */
612
- startTime?:
613
- string;
614
- }
615
- // tslint:disable-next-line:no-empty-interface
616
- interface UnknownUser {
617
- }
618
- // tslint:disable-next-line:no-empty-interface
619
- interface Upload {
620
- }
621
- interface User {
622
- /** A user whose account has since been deleted. */
623
- deletedUser?:
624
- any;
625
- /** A known user. */
626
- knownUser?:
627
- KnownUser;
628
- /** A user about whom nothing is currently known. */
629
- unknownUser?:
630
- any;
631
- }
632
- interface UserList {
633
- /** User values. */
634
- values?:
635
- SingleUser[];
636
- }
637
- interface ActivityResource {
638
- /** Query past activity in Google Drive. */
639
- query(request: {
640
- /** V1 error format. */
641
- "$.xgafv"?:
642
- string;
643
- /** OAuth access token. */
644
- access_token?:
645
- string;
646
- /** Data format for response. */
647
- alt?:
648
- string;
649
- /** JSONP */
650
- callback?:
651
- string;
652
- /** Selector specifying which fields to include in a partial response. */
653
- fields?:
654
- string;
655
- /** 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. */
656
- key?:
657
- string;
658
- /** OAuth 2.0 token for the current user. */
659
- oauth_token?:
660
- string;
661
- /** Returns response with indentations and line breaks. */
662
- prettyPrint?:
663
- boolean;
664
- /** 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. */
665
- quotaUser?:
666
- string;
667
- /** Upload protocol for media (e.g. "raw", "multipart"). */
668
- upload_protocol?:
669
- string;
670
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
671
- uploadType?:
672
- string;
673
- /** Request body */
674
- resource:
675
- QueryDriveActivityRequest;
676
- }): Request<QueryDriveActivityResponse>;
677
- query(request: {
678
- /** V1 error format. */
679
- "$.xgafv"?:
680
- string;
681
- /** OAuth access token. */
682
- access_token?:
683
- string;
684
- /** Data format for response. */
685
- alt?:
686
- string;
687
- /** JSONP */
688
- callback?:
689
- string;
690
- /** Selector specifying which fields to include in a partial response. */
691
- fields?:
692
- string;
693
- /** 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. */
694
- key?:
695
- string;
696
- /** OAuth 2.0 token for the current user. */
697
- oauth_token?:
698
- string;
699
- /** Returns response with indentations and line breaks. */
700
- prettyPrint?:
701
- boolean;
702
- /** 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. */
703
- quotaUser?:
704
- string;
705
- /** Upload protocol for media (e.g. "raw", "multipart"). */
706
- upload_protocol?:
707
- string;
708
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
709
- uploadType?:
710
- string;
711
- },
712
- body: QueryDriveActivityRequest): Request<QueryDriveActivityResponse>;
713
- }
714
-
715
- const activity: ActivityResource;
30
+ namespace driveactivity {
31
+ interface Action {
32
+ /** The actor responsible for this action (or empty if all actors are responsible). */
33
+ actor?: Actor;
34
+ /** The type and detailed information about the action. */
35
+ detail?: ActionDetail;
36
+ /** The target this action affects (or empty if affecting all targets). This represents the state of the target immediately after this action occurred. */
37
+ target?: Target;
38
+ /** The action occurred over this time range. */
39
+ timeRange?: TimeRange;
40
+ /** The action occurred at this specific time. */
41
+ timestamp?: string;
42
+ }
43
+ interface ActionDetail {
44
+ /** Label was changed. */
45
+ appliedLabelChange?: AppliedLabelChange;
46
+ /** A change about comments was made. */
47
+ comment?: Comment;
48
+ /** An object was created. */
49
+ create?: Create;
50
+ /** An object was deleted. */
51
+ delete?: Delete;
52
+ /** A change happened in data leak prevention status. */
53
+ dlpChange?: DataLeakPreventionChange;
54
+ /** An object was edited. */
55
+ edit?: any;
56
+ /** An object was moved. */
57
+ move?: Move;
58
+ /** The permission on an object was changed. */
59
+ permissionChange?: PermissionChange;
60
+ /** An object was referenced in an application outside of Drive/Docs. */
61
+ reference?: ApplicationReference;
62
+ /** An object was renamed. */
63
+ rename?: Rename;
64
+ /** A deleted object was restored. */
65
+ restore?: Restore;
66
+ /** Settings were changed. */
67
+ settingsChange?: SettingsChange;
68
+ }
69
+ interface Actor {
70
+ /** An administrator. */
71
+ administrator?: any;
72
+ /** An anonymous user. */
73
+ anonymous?: any;
74
+ /** An account acting on behalf of another. */
75
+ impersonation?: Impersonation;
76
+ /** A non-user actor (i.e. system triggered). */
77
+ system?: SystemEvent;
78
+ /** An end user. */
79
+ user?: User;
80
+ }
81
+ interface Administrator {}
82
+ interface AnonymousUser {}
83
+ interface Anyone {}
84
+ interface ApplicationReference {
85
+ /** The reference type corresponding to this event. */
86
+ type?: string;
87
+ }
88
+ interface AppliedLabelChange {
89
+ /** Changes that were made to the Label on the Target. */
90
+ changes?: AppliedLabelChangeDetail[];
91
+ }
92
+ interface AppliedLabelChangeDetail {
93
+ /** Field Changes. Only present if `types` contains `LABEL_FIELD_VALUE_CHANGED`. */
94
+ fieldChanges?: FieldValueChange[];
95
+ /** The Label name representing the Label that changed. This name always contains the revision of the Label that was used when this Action occurred. The format is `labels/id@revision`. */
96
+ label?: string;
97
+ /** The human-readable title of the label that changed. */
98
+ title?: string;
99
+ /** The types of changes made to the Label on the Target. */
100
+ types?: string[];
101
+ }
102
+ interface Assignment {
103
+ /** The user to whom the comment was assigned. */
104
+ assignedUser?: User;
105
+ /** The sub-type of this event. */
106
+ subtype?: string;
107
+ }
108
+ interface Comment {
109
+ /** A change on an assignment. */
110
+ assignment?: Assignment;
111
+ /** Users who are mentioned in this comment. */
112
+ mentionedUsers?: User[];
113
+ /** A change on a regular posted comment. */
114
+ post?: Post;
115
+ /** A change on a suggestion. */
116
+ suggestion?: Suggestion;
117
+ }
118
+ interface ConsolidationStrategy {
119
+ /** The individual activities are consolidated using the legacy strategy. */
120
+ legacy?: any;
121
+ /** The individual activities are not consolidated. */
122
+ none?: any;
123
+ }
124
+ interface Copy {
125
+ /** The original object. */
126
+ originalObject?: TargetReference;
127
+ }
128
+ interface Create {
129
+ /** If present, indicates the object was created by copying an existing Drive object. */
130
+ copy?: Copy;
131
+ /** If present, indicates the object was newly created (e.g. as a blank document), not derived from a Drive object or external object. */
132
+ new?: any;
133
+ /** If present, indicates the object originated externally and was uploaded to Drive. */
134
+ upload?: any;
135
+ }
136
+ interface DataLeakPreventionChange {
137
+ /** The type of Data Leak Prevention (DLP) change. */
138
+ type?: string;
139
+ }
140
+ interface Date {
141
+ /** Date value. */
142
+ value?: string;
143
+ }
144
+ interface Delete {
145
+ /** The type of delete action taken. */
146
+ type?: string;
147
+ }
148
+ interface DeletedUser {}
149
+ interface Domain {
150
+ /** An opaque string used to identify this domain. */
151
+ legacyId?: string;
152
+ /** The name of the domain, e.g. `google.com`. */
153
+ name?: string;
154
+ }
155
+ interface Drive {
156
+ /** The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */
157
+ name?: string;
158
+ /** The root of this shared drive. */
159
+ root?: DriveItem;
160
+ /** The title of the shared drive. */
161
+ title?: string;
162
+ }
163
+ interface DriveActivity {
164
+ /** Details on all actions in this activity. */
165
+ actions?: Action[];
166
+ /** All actor(s) responsible for the activity. */
167
+ actors?: Actor[];
168
+ /** Key information about the primary action for this activity. This is either representative, or the most important, of all actions in the activity, according to the ConsolidationStrategy in the request. */
169
+ primaryActionDetail?: ActionDetail;
170
+ /** All Google Drive objects this activity is about (e.g. file, folder, drive). This represents the state of the target immediately after the actions occurred. */
171
+ targets?: Target[];
172
+ /** The activity occurred over this time range. */
173
+ timeRange?: TimeRange;
174
+ /** The activity occurred at this specific time. */
175
+ timestamp?: string;
176
+ }
177
+ interface DriveFile {}
178
+ interface DriveFolder {
179
+ /** The type of Drive folder. */
180
+ type?: string;
181
+ }
182
+ interface DriveItem {
183
+ /** The Drive item is a file. */
184
+ driveFile?: any;
185
+ /** The Drive item is a folder. Includes information about the type of folder. */
186
+ driveFolder?: DriveFolder;
187
+ /** This field is deprecated; please use the `driveFile` field instead. */
188
+ file?: any;
189
+ /** This field is deprecated; please use the `driveFolder` field instead. */
190
+ folder?: Folder;
191
+ /** The MIME type of the Drive item. See https://developers.google.com/drive/v3/web/mime-types. */
192
+ mimeType?: string;
193
+ /** The target Drive item. The format is `items/ITEM_ID`. */
194
+ name?: string;
195
+ /** Information about the owner of this Drive item. */
196
+ owner?: Owner;
197
+ /** The title of the Drive item. */
198
+ title?: string;
199
+ }
200
+ interface DriveItemReference {
201
+ /** The Drive item is a file. */
202
+ driveFile?: any;
203
+ /** The Drive item is a folder. Includes information about the type of folder. */
204
+ driveFolder?: DriveFolder;
205
+ /** This field is deprecated; please use the `driveFile` field instead. */
206
+ file?: any;
207
+ /** This field is deprecated; please use the `driveFolder` field instead. */
208
+ folder?: Folder;
209
+ /** The target Drive item. The format is `items/ITEM_ID`. */
210
+ name?: string;
211
+ /** The title of the Drive item. */
212
+ title?: string;
213
+ }
214
+ interface DriveReference {
215
+ /** The resource name of the shared drive. The format is `COLLECTION_ID/DRIVE_ID`. Clients should not assume a specific collection ID for this resource name. */
216
+ name?: string;
217
+ /** The title of the shared drive. */
218
+ title?: string;
219
+ }
220
+ interface Edit {}
221
+ interface FieldValue {
222
+ /** Date Field value. */
223
+ date?: Date;
224
+ /** Integer Field value. */
225
+ integer?: Integer;
226
+ /** Selection Field value. */
227
+ selection?: Selection;
228
+ /** Selection List Field value. */
229
+ selectionList?: SelectionList;
230
+ /** Text Field value. */
231
+ text?: Text;
232
+ /** Text List Field value. */
233
+ textList?: TextList;
234
+ /** User Field value. */
235
+ user?: SingleUser;
236
+ /** User List Field value. */
237
+ userList?: UserList;
238
+ }
239
+ interface FieldValueChange {
240
+ /** The human-readable display name for this field. */
241
+ displayName?: string;
242
+ /** The ID of this field. Field IDs are unique within a Label. */
243
+ fieldId?: string;
244
+ /** The value that is now set on the field. If not present, the field was cleared. At least one of {old_value|new_value} is always set. */
245
+ newValue?: FieldValue;
246
+ /** The value that was previously set on the field. If not present, the field was newly set. At least one of {old_value|new_value} is always set. */
247
+ oldValue?: FieldValue;
248
+ }
249
+ interface File {}
250
+ interface FileComment {
251
+ /** The comment in the discussion thread. This identifier is an opaque string compatible with the Drive API; see https://developers.google.com/drive/v3/reference/comments/get */
252
+ legacyCommentId?: string;
253
+ /** The discussion thread to which the comment was added. This identifier is an opaque string compatible with the Drive API and references the first comment in a discussion; see https://developers.google.com/drive/v3/reference/comments/get */
254
+ legacyDiscussionId?: string;
255
+ /** The link to the discussion thread containing this comment, for example, `https://docs.google.com/DOCUMENT_ID/edit?disco=THREAD_ID`. */
256
+ linkToDiscussion?: string;
257
+ /** The Drive item containing this comment. */
258
+ parent?: DriveItem;
259
+ }
260
+ interface Folder {
261
+ /** This field is deprecated; please see `DriveFolder.type` instead. */
262
+ type?: string;
263
+ }
264
+ interface Group {
265
+ /** The email address of the group. */
266
+ email?: string;
267
+ /** The title of the group. */
268
+ title?: string;
269
+ }
270
+ interface Impersonation {
271
+ /** The impersonated user. */
272
+ impersonatedUser?: User;
273
+ }
274
+ interface Integer {
275
+ /** Integer value. */
276
+ value?: string;
716
277
  }
278
+ interface KnownUser {
279
+ /** True if this is the user making the request. */
280
+ isCurrentUser?: boolean;
281
+ /** The identifier for this user that can be used with the People API to get more information. The format is `people/ACCOUNT_ID`. See https://developers.google.com/people/. */
282
+ personName?: string;
283
+ }
284
+ interface Legacy {}
285
+ interface Move {
286
+ /** The added parent object(s). */
287
+ addedParents?: TargetReference[];
288
+ /** The removed parent object(s). */
289
+ removedParents?: TargetReference[];
290
+ }
291
+ interface New {}
292
+ interface NoConsolidation {}
293
+ interface Owner {
294
+ /** The domain of the Drive item owner. */
295
+ domain?: Domain;
296
+ /** The drive that owns the item. */
297
+ drive?: DriveReference;
298
+ /** This field is deprecated; please use the `drive` field instead. */
299
+ teamDrive?: TeamDriveReference;
300
+ /** The user that owns the Drive item. */
301
+ user?: User;
302
+ }
303
+ interface Permission {
304
+ /** If true, the item can be discovered (e.g. in the user's "Shared with me" collection) without needing a link to the item. */
305
+ allowDiscovery?: boolean;
306
+ /** If set, this permission applies to anyone, even logged out users. */
307
+ anyone?: any;
308
+ /** The domain to whom this permission applies. */
309
+ domain?: Domain;
310
+ /** The group to whom this permission applies. */
311
+ group?: Group;
312
+ /** Indicates the [Google Drive permissions role](https://developers.google.com/drive/web/manage-sharing#roles). The role determines a user's ability to read, write, and comment on items. */
313
+ role?: string;
314
+ /** The user to whom this permission applies. */
315
+ user?: User;
316
+ }
317
+ interface PermissionChange {
318
+ /** The set of permissions added by this change. */
319
+ addedPermissions?: Permission[];
320
+ /** The set of permissions removed by this change. */
321
+ removedPermissions?: Permission[];
322
+ }
323
+ interface Post {
324
+ /** The sub-type of this event. */
325
+ subtype?: string;
326
+ }
327
+ interface QueryDriveActivityRequest {
328
+ /** Return activities for this Drive folder, plus all children and descendants. The format is `items/ITEM_ID`. */
329
+ ancestorName?: string;
330
+ /** Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated. */
331
+ consolidationStrategy?: ConsolidationStrategy;
332
+ /** The filtering for items returned from this query request. The format of the filter string is a sequence of expressions, joined by an optional "AND", where each expression is of the form "field operator value". Supported fields: - `time`: Uses numerical operators on date values either in terms of milliseconds since Jan 1, 1970 or in RFC 3339 format. Examples: - `time > 1452409200000 AND time <= 1492812924310` - `time >= "2016-01-10T01:02:03-05:00"` - `detail.action_detail_case`: Uses the "has" operator (:) and either a singular value or a list of allowed action types enclosed in parentheses, separated by a space. To exclude a result from the response, prepend a hyphen (`-`) to the beginning of the filter string. Examples: - `detail.action_detail_case:RENAME` - `detail.action_detail_case:(CREATE RESTORE)` - `-detail.action_detail_case:MOVE` */
333
+ filter?: string;
334
+ /** Return activities for this Drive item. The format is `items/ITEM_ID`. */
335
+ itemName?: string;
336
+ /** The minimum number of activities desired in the response; the server attempts to return at least this quantity. The server may also return fewer activities if it has a partial response ready before the request times out. If not set, a default value is used. */
337
+ pageSize?: number;
338
+ /** The token identifies which page of results to return. Set this to the next_page_token value returned from a previous query to obtain the following page of results. If not set, the first page of results is returned. */
339
+ pageToken?: string;
340
+ }
341
+ interface QueryDriveActivityResponse {
342
+ /** List of activity requested. */
343
+ activities?: DriveActivity[];
344
+ /** Token to retrieve the next page of results, or empty if there are no more results in the list. */
345
+ nextPageToken?: string;
346
+ }
347
+ interface Rename {
348
+ /** The new title of the drive object. */
349
+ newTitle?: string;
350
+ /** The previous title of the drive object. */
351
+ oldTitle?: string;
352
+ }
353
+ interface Restore {
354
+ /** The type of restore action taken. */
355
+ type?: string;
356
+ }
357
+ interface RestrictionChange {
358
+ /** The feature which had a change in restriction policy. */
359
+ feature?: string;
360
+ /** The restriction in place after the change. */
361
+ newRestriction?: string;
362
+ }
363
+ interface Selection {
364
+ /** Selection value as human-readable display string. */
365
+ displayName?: string;
366
+ /** Selection value as Field Choice ID. */
367
+ value?: string;
368
+ }
369
+ interface SelectionList {
370
+ /** Selection values. */
371
+ values?: Selection[];
372
+ }
373
+ interface SettingsChange {
374
+ /** The set of changes made to restrictions. */
375
+ restrictionChanges?: RestrictionChange[];
376
+ }
377
+ interface SingleUser {
378
+ /** User value as email. */
379
+ value?: string;
380
+ }
381
+ interface Suggestion {
382
+ /** The sub-type of this event. */
383
+ subtype?: string;
384
+ }
385
+ interface SystemEvent {
386
+ /** The type of the system event that may triggered activity. */
387
+ type?: string;
388
+ }
389
+ interface Target {
390
+ /** The target is a shared drive. */
391
+ drive?: Drive;
392
+ /** The target is a Drive item. */
393
+ driveItem?: DriveItem;
394
+ /** The target is a comment on a Drive file. */
395
+ fileComment?: FileComment;
396
+ /** This field is deprecated; please use the `drive` field instead. */
397
+ teamDrive?: TeamDrive;
398
+ }
399
+ interface TargetReference {
400
+ /** The target is a shared drive. */
401
+ drive?: DriveReference;
402
+ /** The target is a Drive item. */
403
+ driveItem?: DriveItemReference;
404
+ /** This field is deprecated; please use the `drive` field instead. */
405
+ teamDrive?: TeamDriveReference;
406
+ }
407
+ interface TeamDrive {
408
+ /** This field is deprecated; please see `Drive.name` instead. */
409
+ name?: string;
410
+ /** This field is deprecated; please see `Drive.root` instead. */
411
+ root?: DriveItem;
412
+ /** This field is deprecated; please see `Drive.title` instead. */
413
+ title?: string;
414
+ }
415
+ interface TeamDriveReference {
416
+ /** This field is deprecated; please see `DriveReference.name` instead. */
417
+ name?: string;
418
+ /** This field is deprecated; please see `DriveReference.title` instead. */
419
+ title?: string;
420
+ }
421
+ interface Text {
422
+ /** Value of Text Field. */
423
+ value?: string;
424
+ }
425
+ interface TextList {
426
+ /** Text values. */
427
+ values?: Text[];
428
+ }
429
+ interface TimeRange {
430
+ /** The end of the time range. */
431
+ endTime?: string;
432
+ /** The start of the time range. */
433
+ startTime?: string;
434
+ }
435
+ interface UnknownUser {}
436
+ interface Upload {}
437
+ interface User {
438
+ /** A user whose account has since been deleted. */
439
+ deletedUser?: any;
440
+ /** A known user. */
441
+ knownUser?: KnownUser;
442
+ /** A user about whom nothing is currently known. */
443
+ unknownUser?: any;
444
+ }
445
+ interface UserList {
446
+ /** User values. */
447
+ values?: SingleUser[];
448
+ }
449
+ interface ActivityResource {
450
+ /** Query past activity in Google Drive. */
451
+ query(request: {
452
+ /** V1 error format. */
453
+ '$.xgafv'?: string;
454
+ /** OAuth access token. */
455
+ access_token?: string;
456
+ /** Data format for response. */
457
+ alt?: string;
458
+ /** JSONP */
459
+ callback?: string;
460
+ /** Selector specifying which fields to include in a partial response. */
461
+ fields?: string;
462
+ /** 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. */
463
+ key?: string;
464
+ /** OAuth 2.0 token for the current user. */
465
+ oauth_token?: string;
466
+ /** Returns response with indentations and line breaks. */
467
+ prettyPrint?: boolean;
468
+ /** 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. */
469
+ quotaUser?: string;
470
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
471
+ upload_protocol?: string;
472
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
473
+ uploadType?: string;
474
+ /** Request body */
475
+ resource: QueryDriveActivityRequest;
476
+ }): Request<QueryDriveActivityResponse>;
477
+ query(
478
+ request: {
479
+ /** V1 error format. */
480
+ '$.xgafv'?: string;
481
+ /** OAuth access token. */
482
+ access_token?: string;
483
+ /** Data format for response. */
484
+ alt?: string;
485
+ /** JSONP */
486
+ callback?: string;
487
+ /** Selector specifying which fields to include in a partial response. */
488
+ fields?: string;
489
+ /** 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. */
490
+ key?: string;
491
+ /** OAuth 2.0 token for the current user. */
492
+ oauth_token?: string;
493
+ /** Returns response with indentations and line breaks. */
494
+ prettyPrint?: boolean;
495
+ /** 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. */
496
+ quotaUser?: string;
497
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
498
+ upload_protocol?: string;
499
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
500
+ uploadType?: string;
501
+ },
502
+ body: QueryDriveActivityRequest
503
+ ): Request<QueryDriveActivityResponse>;
504
+ }
505
+
506
+ const activity: ActivityResource;
507
+ }
717
508
  }