@maxim_mazurok/gapi.client.drive-v3 0.0.20230206 → 0.0.20230219
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 +27 -15
- package/package.json +1 -1
- package/readme.md +2 -2
- package/tests.ts +11 -3
package/index.d.ts
CHANGED
@@ -9,7 +9,7 @@
|
|
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://www.googleapis.com/discovery/v1/apis/drive/v3/rest
|
12
|
-
// Revision:
|
12
|
+
// Revision: 20230219
|
13
13
|
|
14
14
|
/// <reference types="gapi.client" />
|
15
15
|
|
@@ -227,6 +227,8 @@ declare namespace gapi.client {
|
|
227
227
|
canChangeDriveBackground?: boolean;
|
228
228
|
/** Whether the current user can change the driveMembersOnly restriction of this shared drive. */
|
229
229
|
canChangeDriveMembersOnlyRestriction?: boolean;
|
230
|
+
/** Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this shared drive. */
|
231
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction?: boolean;
|
230
232
|
/** Whether the current user can comment on files in this shared drive. */
|
231
233
|
canComment?: boolean;
|
232
234
|
/** Whether the current user can copy files in this shared drive. */
|
@@ -286,6 +288,8 @@ declare namespace gapi.client {
|
|
286
288
|
domainUsersOnly?: boolean;
|
287
289
|
/** Whether access to items inside this shared drive is restricted to its members. */
|
288
290
|
driveMembersOnly?: boolean;
|
291
|
+
/** If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders. */
|
292
|
+
sharingFoldersRequiresOrganizerPermission?: boolean;
|
289
293
|
};
|
290
294
|
/**
|
291
295
|
* The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a
|
@@ -776,44 +780,48 @@ declare namespace gapi.client {
|
|
776
780
|
deleted?: boolean;
|
777
781
|
/**
|
778
782
|
* The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
|
779
|
-
* - user - User's full name, as defined for their Google
|
783
|
+
* - user - User's full name, as defined for their Google Account, such as "Joe Smith."
|
780
784
|
* - group - Name of the Google Group, such as "The Company Administrators."
|
781
|
-
* - domain - String domain name, such as "
|
785
|
+
* - domain - String domain name, such as "your-company.com."
|
782
786
|
* - anyone - No displayName is present.
|
783
787
|
*/
|
784
788
|
displayName?: string;
|
785
|
-
/**
|
789
|
+
/**
|
790
|
+
* The domain to which this permission refers. The following options are currently allowed:
|
791
|
+
* - The entire domain, such as "your-company.com."
|
792
|
+
* - A target audience, such as "ID.audience.googledomains.com."
|
793
|
+
*/
|
786
794
|
domain?: string;
|
787
795
|
/** The email address of the user or group to which this permission refers. */
|
788
796
|
emailAddress?: string;
|
789
797
|
/**
|
790
798
|
* The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
791
|
-
* - They cannot be set on shared drive items
|
792
|
-
* - They can only be set on user and group permissions
|
793
|
-
* - The time must be in the future
|
794
|
-
* - The time cannot be more than
|
799
|
+
* - They cannot be set on shared drive items.
|
800
|
+
* - They can only be set on user and group permissions.
|
801
|
+
* - The time must be in the future.
|
802
|
+
* - The time cannot be more than one year in the future.
|
795
803
|
*/
|
796
804
|
expirationTime?: string;
|
797
805
|
/** The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values. */
|
798
806
|
id?: string;
|
799
807
|
/** Identifies what kind of resource this is. Value: the fixed string "drive#permission". */
|
800
808
|
kind?: string;
|
801
|
-
/** Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that
|
809
|
+
/** Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive. */
|
802
810
|
pendingOwner?: boolean;
|
803
|
-
/** Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field
|
811
|
+
/** Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items. */
|
804
812
|
permissionDetails?: Array<{
|
805
813
|
/** Whether this permission is inherited. This field is always populated. This is an output-only field. */
|
806
814
|
inherited?: boolean;
|
807
815
|
/** The ID of the item from which this permission is inherited. This is an output-only field. */
|
808
816
|
inheritedFrom?: string;
|
809
817
|
/**
|
810
|
-
* The permission type for this user. While new values may be added in future, the following are currently
|
818
|
+
* The permission type for this user. While new values may be added in future, the following are currently allowed:
|
811
819
|
* - file
|
812
820
|
* - member
|
813
821
|
*/
|
814
822
|
permissionType?: string;
|
815
823
|
/**
|
816
|
-
* The primary role for this user. While new values may be added in the future, the following are currently
|
824
|
+
* The primary role for this user. While new values may be added in the future, the following are currently allowed:
|
817
825
|
* - organizer
|
818
826
|
* - fileOrganizer
|
819
827
|
* - writer
|
@@ -851,7 +859,7 @@ declare namespace gapi.client {
|
|
851
859
|
* - group
|
852
860
|
* - domain
|
853
861
|
* - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't
|
854
|
-
* extra information required for
|
862
|
+
* extra information required for the anyone type.
|
855
863
|
*/
|
856
864
|
type?: string;
|
857
865
|
/** Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value. */
|
@@ -988,6 +996,8 @@ declare namespace gapi.client {
|
|
988
996
|
canChangeCopyRequiresWriterPermissionRestriction?: boolean;
|
989
997
|
/** Whether the current user can change the domainUsersOnly restriction of this Team Drive. */
|
990
998
|
canChangeDomainUsersOnlyRestriction?: boolean;
|
999
|
+
/** Whether the current user can change the sharingFoldersRequiresOrganizerPermission restriction of this Team Drive. */
|
1000
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction?: boolean;
|
991
1001
|
/** Whether the current user can change the background of this Team Drive. */
|
992
1002
|
canChangeTeamDriveBackground?: boolean;
|
993
1003
|
/** Whether the current user can change the teamMembersOnly restriction of this Team Drive. */
|
@@ -1049,6 +1059,8 @@ declare namespace gapi.client {
|
|
1049
1059
|
* other sharing policies controlled outside of this Team Drive.
|
1050
1060
|
*/
|
1051
1061
|
domainUsersOnly?: boolean;
|
1062
|
+
/** If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders. */
|
1063
|
+
sharingFoldersRequiresOrganizerPermission?: boolean;
|
1052
1064
|
/** Whether access to items inside this Team Drive is restricted to members of this Team Drive. */
|
1053
1065
|
teamMembersOnly?: boolean;
|
1054
1066
|
};
|
@@ -1183,7 +1195,7 @@ declare namespace gapi.client {
|
|
1183
1195
|
/** Deprecated. Please use quotaUser instead. */
|
1184
1196
|
userIp?: string;
|
1185
1197
|
}): Request<ChangeList>;
|
1186
|
-
/** Subscribes to changes for a user. */
|
1198
|
+
/** Subscribes to changes for a user. To use this method, you must include the pageToken query parameter. */
|
1187
1199
|
watch(request: {
|
1188
1200
|
/** Data format for the response. */
|
1189
1201
|
alt?: string;
|
@@ -2259,7 +2271,7 @@ declare namespace gapi.client {
|
|
2259
2271
|
body: Channel): Request<Channel>;
|
2260
2272
|
}
|
2261
2273
|
interface PermissionsResource {
|
2262
|
-
/** Creates a permission for a file or shared drive. */
|
2274
|
+
/** Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders & drives. */
|
2263
2275
|
create(request: {
|
2264
2276
|
/** Data format for the response. */
|
2265
2277
|
alt?: string;
|
package/package.json
CHANGED
package/readme.md
CHANGED
@@ -103,7 +103,7 @@ Lists the changes for a user or shared drive.
|
|
103
103
|
await gapi.client.drive.changes.list({ pageToken: "pageToken", });
|
104
104
|
|
105
105
|
/*
|
106
|
-
Subscribes to changes for a user.
|
106
|
+
Subscribes to changes for a user. To use this method, you must include the pageToken query parameter.
|
107
107
|
*/
|
108
108
|
await gapi.client.drive.changes.watch({ pageToken: "pageToken", });
|
109
109
|
|
@@ -233,7 +233,7 @@ Subscribes to changes to a file. While you can establish a channel for changes t
|
|
233
233
|
await gapi.client.drive.files.watch({ fileId: "fileId", });
|
234
234
|
|
235
235
|
/*
|
236
|
-
Creates a permission for a file or shared drive.
|
236
|
+
Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders & drives.
|
237
237
|
*/
|
238
238
|
await gapi.client.drive.permissions.create({ fileId: "fileId", });
|
239
239
|
|
package/tests.ts
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
5
5
|
|
6
|
-
// Revision:
|
6
|
+
// Revision: 20230219
|
7
7
|
|
8
8
|
gapi.load('client', async () => {
|
9
9
|
/** now we can use gapi.client */
|
@@ -69,7 +69,7 @@ gapi.load('client', async () => {
|
|
69
69
|
supportsTeamDrives: true,
|
70
70
|
teamDriveId: "Test string",
|
71
71
|
});
|
72
|
-
/** Subscribes to changes for a user. */
|
72
|
+
/** Subscribes to changes for a user. To use this method, you must include the pageToken query parameter. */
|
73
73
|
await gapi.client.drive.changes.watch({
|
74
74
|
driveId: "Test string",
|
75
75
|
includeCorpusRemovals: true,
|
@@ -243,6 +243,7 @@ gapi.load('client', async () => {
|
|
243
243
|
canChangeDomainUsersOnlyRestriction: true,
|
244
244
|
canChangeDriveBackground: true,
|
245
245
|
canChangeDriveMembersOnlyRestriction: true,
|
246
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: true,
|
246
247
|
canComment: true,
|
247
248
|
canCopy: true,
|
248
249
|
canDeleteChildren: true,
|
@@ -270,6 +271,7 @@ gapi.load('client', async () => {
|
|
270
271
|
copyRequiresWriterPermission: true,
|
271
272
|
domainUsersOnly: true,
|
272
273
|
driveMembersOnly: true,
|
274
|
+
sharingFoldersRequiresOrganizerPermission: true,
|
273
275
|
},
|
274
276
|
themeId: "Test string",
|
275
277
|
});
|
@@ -317,6 +319,7 @@ gapi.load('client', async () => {
|
|
317
319
|
canChangeDomainUsersOnlyRestriction: true,
|
318
320
|
canChangeDriveBackground: true,
|
319
321
|
canChangeDriveMembersOnlyRestriction: true,
|
322
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: true,
|
320
323
|
canComment: true,
|
321
324
|
canCopy: true,
|
322
325
|
canDeleteChildren: true,
|
@@ -344,6 +347,7 @@ gapi.load('client', async () => {
|
|
344
347
|
copyRequiresWriterPermission: true,
|
345
348
|
domainUsersOnly: true,
|
346
349
|
driveMembersOnly: true,
|
350
|
+
sharingFoldersRequiresOrganizerPermission: true,
|
347
351
|
},
|
348
352
|
themeId: "Test string",
|
349
353
|
});
|
@@ -1316,7 +1320,7 @@ gapi.load('client', async () => {
|
|
1316
1320
|
token: "Test string",
|
1317
1321
|
type: "Test string",
|
1318
1322
|
});
|
1319
|
-
/** Creates a permission for a file or shared drive. */
|
1323
|
+
/** Creates a permission for a file or shared drive. For more information on creating permissions, see Share files, folders & drives. */
|
1320
1324
|
await gapi.client.drive.permissions.create({
|
1321
1325
|
emailMessage: "Test string",
|
1322
1326
|
enforceSingleParent: true,
|
@@ -1554,6 +1558,7 @@ gapi.load('client', async () => {
|
|
1554
1558
|
canAddChildren: true,
|
1555
1559
|
canChangeCopyRequiresWriterPermissionRestriction: true,
|
1556
1560
|
canChangeDomainUsersOnlyRestriction: true,
|
1561
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: true,
|
1557
1562
|
canChangeTeamDriveBackground: true,
|
1558
1563
|
canChangeTeamMembersOnlyRestriction: true,
|
1559
1564
|
canComment: true,
|
@@ -1582,6 +1587,7 @@ gapi.load('client', async () => {
|
|
1582
1587
|
adminManagedRestrictions: true,
|
1583
1588
|
copyRequiresWriterPermission: true,
|
1584
1589
|
domainUsersOnly: true,
|
1590
|
+
sharingFoldersRequiresOrganizerPermission: true,
|
1585
1591
|
teamMembersOnly: true,
|
1586
1592
|
},
|
1587
1593
|
themeId: "Test string",
|
@@ -1618,6 +1624,7 @@ gapi.load('client', async () => {
|
|
1618
1624
|
canAddChildren: true,
|
1619
1625
|
canChangeCopyRequiresWriterPermissionRestriction: true,
|
1620
1626
|
canChangeDomainUsersOnlyRestriction: true,
|
1627
|
+
canChangeSharingFoldersRequiresOrganizerPermissionRestriction: true,
|
1621
1628
|
canChangeTeamDriveBackground: true,
|
1622
1629
|
canChangeTeamMembersOnlyRestriction: true,
|
1623
1630
|
canComment: true,
|
@@ -1646,6 +1653,7 @@ gapi.load('client', async () => {
|
|
1646
1653
|
adminManagedRestrictions: true,
|
1647
1654
|
copyRequiresWriterPermission: true,
|
1648
1655
|
domainUsersOnly: true,
|
1656
|
+
sharingFoldersRequiresOrganizerPermission: true,
|
1649
1657
|
teamMembersOnly: true,
|
1650
1658
|
},
|
1651
1659
|
themeId: "Test string",
|