@maxim_mazurok/gapi.client.drive-v3 0.0.20241102 → 0.0.20241110

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.d.ts +137 -72
  2. package/package.json +1 -1
  3. package/readme.md +15 -0
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: 20241102
12
+ // Revision: 20241110
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -872,6 +872,16 @@ declare namespace gapi.client {
872
872
  /** The list of replies. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched. */
873
873
  replies?: Reply[];
874
874
  }
875
+ interface ResolveAccessProposalRequest {
876
+ /** Required. The action to take on the AccessProposal. */
877
+ action?: string;
878
+ /** Optional. The roles the approver has allowed, if any. Note: This field is required for the `ACCEPT` action. */
879
+ role?: string[];
880
+ /** Optional. Whether to send an email to the requester when the AccessProposal is denied or accepted. */
881
+ sendNotification?: boolean;
882
+ /** Optional. Indicates the view for this access proposal. This should only be set when the proposal belongs to a view. `published` is the only supported value. */
883
+ view?: string;
884
+ }
875
885
  interface Revision {
876
886
  /** Output only. Links for exporting Docs Editors files to specific formats. */
877
887
  exportLinks?: {[P in string]: string};
@@ -1060,6 +1070,130 @@ declare namespace gapi.client {
1060
1070
  uploadType?: string;
1061
1071
  }): Request<About>;
1062
1072
  }
1073
+ interface AccessproposalsResource {
1074
+ /** Retrieves an AccessProposal by ID. */
1075
+ get(request?: {
1076
+ /** V1 error format. */
1077
+ '$.xgafv'?: string;
1078
+ /** OAuth access token. */
1079
+ access_token?: string;
1080
+ /** Data format for response. */
1081
+ alt?: string;
1082
+ /** JSONP */
1083
+ callback?: string;
1084
+ /** Selector specifying which fields to include in a partial response. */
1085
+ fields?: string;
1086
+ /** Required. The id of the item the request is on. */
1087
+ fileId: string;
1088
+ /** 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. */
1089
+ key?: string;
1090
+ /** OAuth 2.0 token for the current user. */
1091
+ oauth_token?: string;
1092
+ /** Returns response with indentations and line breaks. */
1093
+ prettyPrint?: boolean;
1094
+ /** Required. The id of the access proposal to resolve. */
1095
+ proposalId: string;
1096
+ /** 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. */
1097
+ quotaUser?: string;
1098
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1099
+ upload_protocol?: string;
1100
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1101
+ uploadType?: string;
1102
+ }): Request<AccessProposal>;
1103
+ /** List the AccessProposals on a file. Note: Only approvers are able to list AccessProposals on a file. If the user is not an approver, returns a 403. */
1104
+ list(request?: {
1105
+ /** V1 error format. */
1106
+ '$.xgafv'?: string;
1107
+ /** OAuth access token. */
1108
+ access_token?: string;
1109
+ /** Data format for response. */
1110
+ alt?: string;
1111
+ /** JSONP */
1112
+ callback?: string;
1113
+ /** Selector specifying which fields to include in a partial response. */
1114
+ fields?: string;
1115
+ /** Required. The id of the item the request is on. */
1116
+ fileId: string;
1117
+ /** 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. */
1118
+ key?: string;
1119
+ /** OAuth 2.0 token for the current user. */
1120
+ oauth_token?: string;
1121
+ /** Optional. The number of results per page */
1122
+ pageSize?: number;
1123
+ /** Optional. The continuation token on the list of access requests. */
1124
+ pageToken?: string;
1125
+ /** Returns response with indentations and line breaks. */
1126
+ prettyPrint?: boolean;
1127
+ /** 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. */
1128
+ quotaUser?: string;
1129
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1130
+ upload_protocol?: string;
1131
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1132
+ uploadType?: string;
1133
+ }): Request<ListAccessProposalsResponse>;
1134
+ /** Used to approve or deny an Access Proposal. */
1135
+ resolve(request: {
1136
+ /** V1 error format. */
1137
+ '$.xgafv'?: string;
1138
+ /** OAuth access token. */
1139
+ access_token?: string;
1140
+ /** Data format for response. */
1141
+ alt?: string;
1142
+ /** JSONP */
1143
+ callback?: string;
1144
+ /** Selector specifying which fields to include in a partial response. */
1145
+ fields?: string;
1146
+ /** Required. The id of the item the request is on. */
1147
+ fileId: string;
1148
+ /** 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. */
1149
+ key?: string;
1150
+ /** OAuth 2.0 token for the current user. */
1151
+ oauth_token?: string;
1152
+ /** Returns response with indentations and line breaks. */
1153
+ prettyPrint?: boolean;
1154
+ /** Required. The id of the access proposal to resolve. */
1155
+ proposalId: string;
1156
+ /** 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. */
1157
+ quotaUser?: string;
1158
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1159
+ upload_protocol?: string;
1160
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1161
+ uploadType?: string;
1162
+ /** Request body */
1163
+ resource: ResolveAccessProposalRequest;
1164
+ }): Request<void>;
1165
+ resolve(
1166
+ request: {
1167
+ /** V1 error format. */
1168
+ '$.xgafv'?: string;
1169
+ /** OAuth access token. */
1170
+ access_token?: string;
1171
+ /** Data format for response. */
1172
+ alt?: string;
1173
+ /** JSONP */
1174
+ callback?: string;
1175
+ /** Selector specifying which fields to include in a partial response. */
1176
+ fields?: string;
1177
+ /** Required. The id of the item the request is on. */
1178
+ fileId: string;
1179
+ /** 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. */
1180
+ key?: string;
1181
+ /** OAuth 2.0 token for the current user. */
1182
+ oauth_token?: string;
1183
+ /** Returns response with indentations and line breaks. */
1184
+ prettyPrint?: boolean;
1185
+ /** Required. The id of the access proposal to resolve. */
1186
+ proposalId: string;
1187
+ /** 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. */
1188
+ quotaUser?: string;
1189
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1190
+ upload_protocol?: string;
1191
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1192
+ uploadType?: string;
1193
+ },
1194
+ body: ResolveAccessProposalRequest
1195
+ ): Request<void>;
1196
+ }
1063
1197
  interface AppsResource {
1064
1198
  /** Gets a specific app. */
1065
1199
  get(request?: {
@@ -1860,76 +1994,6 @@ declare namespace gapi.client {
1860
1994
  body: Drive
1861
1995
  ): Request<Drive>;
1862
1996
  }
1863
- interface AccessproposalsResource {
1864
- /** List the AccessProposals on a file. Note: Only approvers are able to list AccessProposals on a file. If the user is not an approver, returns a 403. */
1865
- list(request?: {
1866
- /** V1 error format. */
1867
- '$.xgafv'?: string;
1868
- /** OAuth access token. */
1869
- access_token?: string;
1870
- /** Data format for response. */
1871
- alt?: string;
1872
- /** JSONP */
1873
- callback?: string;
1874
- /** Selector specifying which fields to include in a partial response. */
1875
- fields?: string;
1876
- /** Required. The id of the item the request is on. */
1877
- fileId: string;
1878
- /** 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. */
1879
- key?: string;
1880
- /** OAuth 2.0 token for the current user. */
1881
- oauth_token?: string;
1882
- /** Optional. The number of results per page */
1883
- pageSize?: number;
1884
- /** Optional. The continuation token on the list of access requests. */
1885
- pageToken?: string;
1886
- /** Returns response with indentations and line breaks. */
1887
- prettyPrint?: boolean;
1888
- /** 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. */
1889
- quotaUser?: string;
1890
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1891
- upload_protocol?: string;
1892
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1893
- uploadType?: string;
1894
- }): Request<ListAccessProposalsResponse>;
1895
- /** Used to approve or deny an Access Proposal. */
1896
- resolve(request?: {
1897
- /** V1 error format. */
1898
- '$.xgafv'?: string;
1899
- /** OAuth access token. */
1900
- access_token?: string;
1901
- /** Required. The action to take on the AccessProposal. */
1902
- action?: string;
1903
- /** Data format for response. */
1904
- alt?: string;
1905
- /** JSONP */
1906
- callback?: string;
1907
- /** Selector specifying which fields to include in a partial response. */
1908
- fields?: string;
1909
- /** Required. The id of the item the request is on. */
1910
- fileId: string;
1911
- /** 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. */
1912
- key?: string;
1913
- /** OAuth 2.0 token for the current user. */
1914
- oauth_token?: string;
1915
- /** Returns response with indentations and line breaks. */
1916
- prettyPrint?: boolean;
1917
- /** Required. The id of the access proposal to resolve. */
1918
- proposalId: string;
1919
- /** 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. */
1920
- quotaUser?: string;
1921
- /** Optional. The roles the approver has allowed, if any. Note: This field is required for the `ACCEPT` action. */
1922
- role?: string | string[];
1923
- /** Optional. Whether to send an email to the requester when the AccessProposal is denied or accepted. */
1924
- sendNotification?: boolean;
1925
- /** Upload protocol for media (e.g. "raw", "multipart"). */
1926
- upload_protocol?: string;
1927
- /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1928
- uploadType?: string;
1929
- /** Optional. Indicates the view for this access proposal. This should only be set when the proposal belongs to a view. `published` is the only supported value. */
1930
- view?: string;
1931
- }): Request<void>;
1932
- }
1933
1997
  interface FilesResource {
1934
1998
  /** Creates a copy of a file and applies any requested updates with patch semantics. */
1935
1999
  copy(request: {
@@ -2621,7 +2685,6 @@ declare namespace gapi.client {
2621
2685
  },
2622
2686
  body: Channel
2623
2687
  ): Request<Channel>;
2624
- accessproposals: AccessproposalsResource;
2625
2688
  }
2626
2689
  interface OperationResource {
2627
2690
  /** Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */
@@ -3622,6 +3685,8 @@ declare namespace gapi.client {
3622
3685
 
3623
3686
  const about: AboutResource;
3624
3687
 
3688
+ const accessproposals: AccessproposalsResource;
3689
+
3625
3690
  const apps: AppsResource;
3626
3691
 
3627
3692
  const changes: ChangesResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.drive-v3",
3
- "version": "0.0.20241102",
3
+ "version": "0.0.20241110",
4
4
  "description": "TypeScript typings for Google Drive API v3",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -102,6 +102,21 @@ Gets information about the user, the user's Drive, and system capabilities.
102
102
  */
103
103
  await gapi.client.drive.about.get({ });
104
104
 
105
+ /*
106
+ Retrieves an AccessProposal by ID.
107
+ */
108
+ await gapi.client.drive.accessproposals.get({ fileId: "fileId", proposalId: "proposalId", });
109
+
110
+ /*
111
+ List the AccessProposals on a file. Note: Only approvers are able to list AccessProposals on a file. If the user is not an approver, returns a 403.
112
+ */
113
+ await gapi.client.drive.accessproposals.list({ fileId: "fileId", });
114
+
115
+ /*
116
+ Used to approve or deny an Access Proposal.
117
+ */
118
+ await gapi.client.drive.accessproposals.resolve({ fileId: "fileId", proposalId: "proposalId", });
119
+
105
120
  /*
106
121
  Gets a specific app.
107
122
  */