@finueva/drive 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -948,6 +948,260 @@ interface operations {
948
948
  };
949
949
  };
950
950
  };
951
+ getWorkspaceSharingPolicy: {
952
+ parameters: {
953
+ query?: never;
954
+ header?: never;
955
+ path?: never;
956
+ cookie?: never;
957
+ };
958
+ requestBody?: never;
959
+ responses: {
960
+ /** @description The current policy. Revision 0 means it was never changed (allowed). */
961
+ 200: {
962
+ headers: {
963
+ /** @description Policy revision for If-Match. */
964
+ ETag?: string;
965
+ [name: string]: unknown;
966
+ };
967
+ content: {
968
+ "application/json": {
969
+ canManage: boolean;
970
+ /** @enum {string} */
971
+ externalSharing: "allowed" | "disabled";
972
+ revision: number;
973
+ updatedAt: number | null;
974
+ workspaceId: string;
975
+ };
976
+ };
977
+ };
978
+ /** @description A valid Drive user credential is required. */
979
+ 401: {
980
+ headers: {
981
+ [name: string]: unknown;
982
+ };
983
+ content: {
984
+ "application/json": {
985
+ error: {
986
+ /** @enum {string} */
987
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
988
+ details: Record<string, never>;
989
+ message: string;
990
+ requestId: string;
991
+ };
992
+ };
993
+ };
994
+ };
995
+ /** @description Managed storage is disabled, or (update) the caller is not an organization owner or admin. */
996
+ 403: {
997
+ headers: {
998
+ [name: string]: unknown;
999
+ };
1000
+ content: {
1001
+ "application/json": {
1002
+ error: {
1003
+ /** @enum {string} */
1004
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1005
+ details: Record<string, never>;
1006
+ message: string;
1007
+ requestId: string;
1008
+ };
1009
+ };
1010
+ };
1011
+ };
1012
+ /** @description The credential selects a personal workspace or an organization workspace not available to this User. */
1013
+ 404: {
1014
+ headers: {
1015
+ [name: string]: unknown;
1016
+ };
1017
+ content: {
1018
+ "application/json": {
1019
+ error: {
1020
+ /** @enum {string} */
1021
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1022
+ details: Record<string, never>;
1023
+ message: string;
1024
+ requestId: string;
1025
+ };
1026
+ };
1027
+ };
1028
+ };
1029
+ /** @description Unsupported query, header or body input. */
1030
+ 422: {
1031
+ headers: {
1032
+ [name: string]: unknown;
1033
+ };
1034
+ content: {
1035
+ "application/json": {
1036
+ error: {
1037
+ /** @enum {string} */
1038
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1039
+ details: Record<string, never>;
1040
+ message: string;
1041
+ requestId: string;
1042
+ };
1043
+ };
1044
+ };
1045
+ };
1046
+ /** @description Identity authority or storage is unavailable. */
1047
+ 503: {
1048
+ headers: {
1049
+ [name: string]: unknown;
1050
+ };
1051
+ content: {
1052
+ "application/json": {
1053
+ error: {
1054
+ /** @enum {string} */
1055
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1056
+ details: Record<string, never>;
1057
+ message: string;
1058
+ requestId: string;
1059
+ };
1060
+ };
1061
+ };
1062
+ };
1063
+ };
1064
+ };
1065
+ updateWorkspaceSharingPolicy: {
1066
+ parameters: {
1067
+ query?: never;
1068
+ header: {
1069
+ "If-Match": string;
1070
+ };
1071
+ path?: never;
1072
+ cookie?: never;
1073
+ };
1074
+ requestBody: {
1075
+ content: {
1076
+ "application/json": {
1077
+ /** @enum {string} */
1078
+ externalSharing: "allowed" | "disabled";
1079
+ };
1080
+ };
1081
+ };
1082
+ responses: {
1083
+ /** @description The policy after the change. */
1084
+ 200: {
1085
+ headers: {
1086
+ /** @description Policy revision for If-Match. */
1087
+ ETag?: string;
1088
+ [name: string]: unknown;
1089
+ };
1090
+ content: {
1091
+ "application/json": {
1092
+ canManage: boolean;
1093
+ /** @enum {string} */
1094
+ externalSharing: "allowed" | "disabled";
1095
+ revision: number;
1096
+ updatedAt: number | null;
1097
+ workspaceId: string;
1098
+ };
1099
+ };
1100
+ };
1101
+ /** @description A valid Drive user credential is required. */
1102
+ 401: {
1103
+ headers: {
1104
+ [name: string]: unknown;
1105
+ };
1106
+ content: {
1107
+ "application/json": {
1108
+ error: {
1109
+ /** @enum {string} */
1110
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1111
+ details: Record<string, never>;
1112
+ message: string;
1113
+ requestId: string;
1114
+ };
1115
+ };
1116
+ };
1117
+ };
1118
+ /** @description Managed storage is disabled, or (update) the caller is not an organization owner or admin. */
1119
+ 403: {
1120
+ headers: {
1121
+ [name: string]: unknown;
1122
+ };
1123
+ content: {
1124
+ "application/json": {
1125
+ error: {
1126
+ /** @enum {string} */
1127
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1128
+ details: Record<string, never>;
1129
+ message: string;
1130
+ requestId: string;
1131
+ };
1132
+ };
1133
+ };
1134
+ };
1135
+ /** @description The credential selects a personal workspace or an organization workspace not available to this User. */
1136
+ 404: {
1137
+ headers: {
1138
+ [name: string]: unknown;
1139
+ };
1140
+ content: {
1141
+ "application/json": {
1142
+ error: {
1143
+ /** @enum {string} */
1144
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1145
+ details: Record<string, never>;
1146
+ message: string;
1147
+ requestId: string;
1148
+ };
1149
+ };
1150
+ };
1151
+ };
1152
+ /** @description The policy changed since the supplied revision. */
1153
+ 412: {
1154
+ headers: {
1155
+ [name: string]: unknown;
1156
+ };
1157
+ content: {
1158
+ "application/json": {
1159
+ error: {
1160
+ /** @enum {string} */
1161
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1162
+ details: Record<string, never>;
1163
+ message: string;
1164
+ requestId: string;
1165
+ };
1166
+ };
1167
+ };
1168
+ };
1169
+ /** @description Unsupported query, header or body input. */
1170
+ 422: {
1171
+ headers: {
1172
+ [name: string]: unknown;
1173
+ };
1174
+ content: {
1175
+ "application/json": {
1176
+ error: {
1177
+ /** @enum {string} */
1178
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1179
+ details: Record<string, never>;
1180
+ message: string;
1181
+ requestId: string;
1182
+ };
1183
+ };
1184
+ };
1185
+ };
1186
+ /** @description Identity authority or storage is unavailable. */
1187
+ 503: {
1188
+ headers: {
1189
+ [name: string]: unknown;
1190
+ };
1191
+ content: {
1192
+ "application/json": {
1193
+ error: {
1194
+ /** @enum {string} */
1195
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1196
+ details: Record<string, never>;
1197
+ message: string;
1198
+ requestId: string;
1199
+ };
1200
+ };
1201
+ };
1202
+ };
1203
+ };
1204
+ };
951
1205
  getCurrentWorkspaceSources: {
952
1206
  parameters: {
953
1207
  query?: never;
@@ -1952,6 +2206,171 @@ interface operations {
1952
2206
  };
1953
2207
  };
1954
2208
  };
2209
+ archiveItem: {
2210
+ parameters: {
2211
+ query?: never;
2212
+ header: {
2213
+ "Idempotency-Key": string;
2214
+ "If-Match": string;
2215
+ };
2216
+ path: {
2217
+ workspaceId: string;
2218
+ itemId: string;
2219
+ };
2220
+ cookie?: never;
2221
+ };
2222
+ requestBody?: never;
2223
+ responses: {
2224
+ /** @description The item was archived or the exact result was replayed. */
2225
+ 200: {
2226
+ headers: {
2227
+ /** @description Strong precondition for the next item mutation. */
2228
+ ETag?: string;
2229
+ [name: string]: unknown;
2230
+ };
2231
+ content: {
2232
+ "application/json": {
2233
+ itemId: string;
2234
+ /** @enum {string} */
2235
+ kind: "file" | "folder";
2236
+ name: string;
2237
+ parentItemId: string;
2238
+ purgeAfterEpochMilliseconds: number;
2239
+ /** @enum {boolean} */
2240
+ retentionHold: true;
2241
+ revision: number;
2242
+ /** @enum {string} */
2243
+ state: "trashed";
2244
+ trashedAtEpochMilliseconds: number;
2245
+ volumeId: string;
2246
+ workspaceId: string;
2247
+ };
2248
+ };
2249
+ };
2250
+ /** @description A valid Drive user bearer credential is required. */
2251
+ 401: {
2252
+ headers: {
2253
+ [name: string]: unknown;
2254
+ };
2255
+ content: {
2256
+ "application/json": {
2257
+ error: {
2258
+ /** @enum {string} */
2259
+ code: "authentication_required";
2260
+ details: Record<string, never>;
2261
+ message: string;
2262
+ requestId: string;
2263
+ };
2264
+ };
2265
+ };
2266
+ };
2267
+ /** @description The caller is not an owner or administrator of this organization workspace, or managed storage is disabled. */
2268
+ 403: {
2269
+ headers: {
2270
+ [name: string]: unknown;
2271
+ };
2272
+ content: {
2273
+ "application/json": {
2274
+ error: {
2275
+ /** @enum {string} */
2276
+ code: "permission_denied";
2277
+ details: Record<string, never>;
2278
+ message: string;
2279
+ requestId: string;
2280
+ };
2281
+ };
2282
+ };
2283
+ };
2284
+ /** @description The workspace or item is absent or undiscoverable. */
2285
+ 404: {
2286
+ headers: {
2287
+ [name: string]: unknown;
2288
+ };
2289
+ content: {
2290
+ "application/json": {
2291
+ error: {
2292
+ /** @enum {string} */
2293
+ code: "resource_not_found";
2294
+ details: Record<string, never>;
2295
+ message: string;
2296
+ requestId: string;
2297
+ };
2298
+ };
2299
+ };
2300
+ };
2301
+ /** @description The key conflicts, the precondition is stale, or the transfer was refused with a reason. */
2302
+ 409: {
2303
+ headers: {
2304
+ [name: string]: unknown;
2305
+ };
2306
+ content: {
2307
+ "application/json": {
2308
+ error: {
2309
+ /** @enum {string} */
2310
+ code: "idempotency_conflict" | "precondition_failed";
2311
+ details: {
2312
+ /** @enum {string} */
2313
+ reason?: "ownership_unchanged" | "ownership_successor_not_member" | "ownership_restricted_items" | "ownership_subtree_too_large";
2314
+ };
2315
+ message: string;
2316
+ requestId: string;
2317
+ };
2318
+ };
2319
+ };
2320
+ };
2321
+ /** @description The path, query, headers, key or strict body is invalid. */
2322
+ 422: {
2323
+ headers: {
2324
+ [name: string]: unknown;
2325
+ };
2326
+ content: {
2327
+ "application/json": {
2328
+ error: {
2329
+ /** @enum {string} */
2330
+ code: "invalid_request" | "invalid_idempotency_key";
2331
+ details: Record<string, never>;
2332
+ message: string;
2333
+ requestId: string;
2334
+ };
2335
+ };
2336
+ };
2337
+ };
2338
+ /** @description Auth membership resolution is temporarily limited; retry after the indicated delay. */
2339
+ 429: {
2340
+ headers: {
2341
+ [name: string]: unknown;
2342
+ };
2343
+ content: {
2344
+ "application/json": {
2345
+ error: {
2346
+ /** @enum {string} */
2347
+ code: "rate_limited";
2348
+ details: Record<string, never>;
2349
+ message: string;
2350
+ requestId: string;
2351
+ };
2352
+ };
2353
+ };
2354
+ };
2355
+ /** @description Identity, Auth membership, D1, authorization or capacity authority is unavailable. */
2356
+ 503: {
2357
+ headers: {
2358
+ [name: string]: unknown;
2359
+ };
2360
+ content: {
2361
+ "application/json": {
2362
+ error: {
2363
+ /** @enum {string} */
2364
+ code: "identity_authority_unavailable" | "service_unavailable";
2365
+ details: Record<string, never>;
2366
+ message: string;
2367
+ requestId: string;
2368
+ };
2369
+ };
2370
+ };
2371
+ };
2372
+ };
2373
+ };
1955
2374
  listFolderChildren: {
1956
2375
  parameters: {
1957
2376
  query?: {
@@ -2626,28 +3045,197 @@ interface operations {
2626
3045
  headers: {
2627
3046
  [name: string]: unknown;
2628
3047
  };
2629
- content?: never;
3048
+ content?: never;
3049
+ };
3050
+ /** @description Authority changed or active-session limit reached. */
3051
+ 409: {
3052
+ headers: {
3053
+ [name: string]: unknown;
3054
+ };
3055
+ content?: never;
3056
+ };
3057
+ /** @description Invalid input. */
3058
+ 422: {
3059
+ headers: {
3060
+ [name: string]: unknown;
3061
+ };
3062
+ content?: never;
3063
+ };
3064
+ /** @description Persistence unavailable. */
3065
+ 503: {
3066
+ headers: {
3067
+ [name: string]: unknown;
3068
+ };
3069
+ content?: never;
3070
+ };
3071
+ };
3072
+ };
3073
+ transferItemOwnership: {
3074
+ parameters: {
3075
+ query?: never;
3076
+ header: {
3077
+ "Idempotency-Key": string;
3078
+ "If-Match": string;
3079
+ };
3080
+ path: {
3081
+ workspaceId: string;
3082
+ itemId: string;
3083
+ };
3084
+ cookie?: never;
3085
+ };
3086
+ requestBody: {
3087
+ content: {
3088
+ "application/json": {
3089
+ includeDescendants: boolean;
3090
+ ownerUserId: string;
3091
+ revokeVisitorGrants: boolean;
3092
+ };
3093
+ };
3094
+ };
3095
+ responses: {
3096
+ /** @description Ownership was transferred or the exact result was replayed. */
3097
+ 200: {
3098
+ headers: {
3099
+ /** @description Strong precondition for the next item mutation. */
3100
+ ETag?: string;
3101
+ [name: string]: unknown;
3102
+ };
3103
+ content: {
3104
+ "application/json": {
3105
+ itemId: string;
3106
+ /** @enum {string} */
3107
+ kind: "file" | "folder";
3108
+ ownerUserId: string;
3109
+ previousOwnerUserId: string | null;
3110
+ revision: number;
3111
+ revokedVisitorGrantCount: number;
3112
+ transferredItemCount: number;
3113
+ volumeId: string;
3114
+ workspaceId: string;
3115
+ };
3116
+ };
3117
+ };
3118
+ /** @description A valid Drive user bearer credential is required. */
3119
+ 401: {
3120
+ headers: {
3121
+ [name: string]: unknown;
3122
+ };
3123
+ content: {
3124
+ "application/json": {
3125
+ error: {
3126
+ /** @enum {string} */
3127
+ code: "authentication_required";
3128
+ details: Record<string, never>;
3129
+ message: string;
3130
+ requestId: string;
3131
+ };
3132
+ };
3133
+ };
3134
+ };
3135
+ /** @description The caller is not an owner or administrator of this organization workspace, or managed storage is disabled. */
3136
+ 403: {
3137
+ headers: {
3138
+ [name: string]: unknown;
3139
+ };
3140
+ content: {
3141
+ "application/json": {
3142
+ error: {
3143
+ /** @enum {string} */
3144
+ code: "permission_denied";
3145
+ details: Record<string, never>;
3146
+ message: string;
3147
+ requestId: string;
3148
+ };
3149
+ };
3150
+ };
3151
+ };
3152
+ /** @description The workspace or item is absent or undiscoverable. */
3153
+ 404: {
3154
+ headers: {
3155
+ [name: string]: unknown;
3156
+ };
3157
+ content: {
3158
+ "application/json": {
3159
+ error: {
3160
+ /** @enum {string} */
3161
+ code: "resource_not_found";
3162
+ details: Record<string, never>;
3163
+ message: string;
3164
+ requestId: string;
3165
+ };
3166
+ };
3167
+ };
3168
+ };
3169
+ /** @description The key conflicts, the precondition is stale, or the transfer was refused with a reason. */
3170
+ 409: {
3171
+ headers: {
3172
+ [name: string]: unknown;
3173
+ };
3174
+ content: {
3175
+ "application/json": {
3176
+ error: {
3177
+ /** @enum {string} */
3178
+ code: "idempotency_conflict" | "precondition_failed";
3179
+ details: {
3180
+ /** @enum {string} */
3181
+ reason?: "ownership_unchanged" | "ownership_successor_not_member" | "ownership_restricted_items" | "ownership_subtree_too_large";
3182
+ };
3183
+ message: string;
3184
+ requestId: string;
3185
+ };
3186
+ };
3187
+ };
3188
+ };
3189
+ /** @description The path, query, headers, key or strict body is invalid. */
3190
+ 422: {
3191
+ headers: {
3192
+ [name: string]: unknown;
3193
+ };
3194
+ content: {
3195
+ "application/json": {
3196
+ error: {
3197
+ /** @enum {string} */
3198
+ code: "invalid_request" | "invalid_idempotency_key";
3199
+ details: Record<string, never>;
3200
+ message: string;
3201
+ requestId: string;
3202
+ };
3203
+ };
3204
+ };
2630
3205
  };
2631
- /** @description Authority changed or active-session limit reached. */
2632
- 409: {
3206
+ /** @description Auth membership resolution is temporarily limited; retry after the indicated delay. */
3207
+ 429: {
2633
3208
  headers: {
2634
3209
  [name: string]: unknown;
2635
3210
  };
2636
- content?: never;
2637
- };
2638
- /** @description Invalid input. */
2639
- 422: {
2640
- headers: {
2641
- [name: string]: unknown;
3211
+ content: {
3212
+ "application/json": {
3213
+ error: {
3214
+ /** @enum {string} */
3215
+ code: "rate_limited";
3216
+ details: Record<string, never>;
3217
+ message: string;
3218
+ requestId: string;
3219
+ };
3220
+ };
2642
3221
  };
2643
- content?: never;
2644
3222
  };
2645
- /** @description Persistence unavailable. */
3223
+ /** @description Identity, Auth membership, D1, authorization or capacity authority is unavailable. */
2646
3224
  503: {
2647
3225
  headers: {
2648
3226
  [name: string]: unknown;
2649
3227
  };
2650
- content?: never;
3228
+ content: {
3229
+ "application/json": {
3230
+ error: {
3231
+ /** @enum {string} */
3232
+ code: "identity_authority_unavailable" | "service_unavailable";
3233
+ details: Record<string, never>;
3234
+ message: string;
3235
+ requestId: string;
3236
+ };
3237
+ };
3238
+ };
2651
3239
  };
2652
3240
  };
2653
3241
  };
@@ -3508,7 +4096,7 @@ interface operations {
3508
4096
  };
3509
4097
  };
3510
4098
  };
3511
- /** @description The discoverable item does not permit this permission operation. */
4099
+ /** @description The item does not permit this permission operation, or the organization turned external sharing off (reason external_sharing_disabled). */
3512
4100
  403: {
3513
4101
  headers: {
3514
4102
  [name: string]: unknown;
@@ -3523,6 +4111,18 @@ interface operations {
3523
4111
  message: "The requested action is not permitted.";
3524
4112
  requestId: string;
3525
4113
  };
4114
+ } | {
4115
+ error: {
4116
+ /** @enum {string} */
4117
+ code: "permission_denied";
4118
+ details: {
4119
+ /** @enum {string} */
4120
+ reason: "external_sharing_disabled";
4121
+ };
4122
+ /** @enum {string} */
4123
+ message: "The requested action is not permitted.";
4124
+ requestId: string;
4125
+ };
3526
4126
  };
3527
4127
  };
3528
4128
  };
@@ -3921,7 +4521,7 @@ interface operations {
3921
4521
  };
3922
4522
  };
3923
4523
  };
3924
- /** @description The discoverable item does not permit this permission operation. */
4524
+ /** @description The item does not permit this permission operation, or the organization turned external sharing off (reason external_sharing_disabled). */
3925
4525
  403: {
3926
4526
  headers: {
3927
4527
  [name: string]: unknown;
@@ -3936,6 +4536,18 @@ interface operations {
3936
4536
  message: "The requested action is not permitted.";
3937
4537
  requestId: string;
3938
4538
  };
4539
+ } | {
4540
+ error: {
4541
+ /** @enum {string} */
4542
+ code: "permission_denied";
4543
+ details: {
4544
+ /** @enum {string} */
4545
+ reason: "external_sharing_disabled";
4546
+ };
4547
+ /** @enum {string} */
4548
+ message: "The requested action is not permitted.";
4549
+ requestId: string;
4550
+ };
3939
4551
  };
3940
4552
  };
3941
4553
  };
@@ -4478,6 +5090,15 @@ interface operations {
4478
5090
  "content-type": string;
4479
5091
  /** @enum {string} */
4480
5092
  "if-none-match": "*";
5093
+ } | {
5094
+ "content-md5": string;
5095
+ "content-type": string;
5096
+ /** @enum {string} */
5097
+ "if-none-match": "*";
5098
+ /** @enum {string} */
5099
+ "x-amz-server-side-encryption-customer-algorithm": "AES256";
5100
+ "x-amz-server-side-encryption-customer-key": string;
5101
+ "x-amz-server-side-encryption-customer-key-md5": string;
4481
5102
  };
4482
5103
  /** @enum {string} */
4483
5104
  method: "PUT";
@@ -4516,6 +5137,15 @@ interface operations {
4516
5137
  "content-type": string;
4517
5138
  /** @enum {string} */
4518
5139
  "if-none-match": "*";
5140
+ } | {
5141
+ "content-md5": string;
5142
+ "content-type": string;
5143
+ /** @enum {string} */
5144
+ "if-none-match": "*";
5145
+ /** @enum {string} */
5146
+ "x-amz-server-side-encryption-customer-algorithm": "AES256";
5147
+ "x-amz-server-side-encryption-customer-key": string;
5148
+ "x-amz-server-side-encryption-customer-key-md5": string;
4519
5149
  };
4520
5150
  /** @enum {string} */
4521
5151
  method: "PUT";
@@ -5109,7 +5739,7 @@ interface operations {
5109
5739
  };
5110
5740
  content?: never;
5111
5741
  };
5112
- /** @description Current item manager authority required. */
5742
+ /** @description Current item manager authority required, or (create and get) permission_denied with reason external_sharing_disabled when the organization turned external sharing off. */
5113
5743
  403: {
5114
5744
  headers: {
5115
5745
  [name: string]: unknown;
@@ -5217,7 +5847,7 @@ interface operations {
5217
5847
  };
5218
5848
  content?: never;
5219
5849
  };
5220
- /** @description Current item manager authority required. */
5850
+ /** @description Current item manager authority required, or (create and get) permission_denied with reason external_sharing_disabled when the organization turned external sharing off. */
5221
5851
  403: {
5222
5852
  headers: {
5223
5853
  [name: string]: unknown;
@@ -5307,7 +5937,7 @@ interface operations {
5307
5937
  };
5308
5938
  content?: never;
5309
5939
  };
5310
- /** @description Current item manager authority required. */
5940
+ /** @description Current item manager authority required, or (create and get) permission_denied with reason external_sharing_disabled when the organization turned external sharing off. */
5311
5941
  403: {
5312
5942
  headers: {
5313
5943
  [name: string]: unknown;
@@ -5392,7 +6022,7 @@ interface operations {
5392
6022
  };
5393
6023
  content?: never;
5394
6024
  };
5395
- /** @description Current item manager authority required. */
6025
+ /** @description Current item manager authority required, or (create and get) permission_denied with reason external_sharing_disabled when the organization turned external sharing off. */
5396
6026
  403: {
5397
6027
  headers: {
5398
6028
  [name: string]: unknown;
@@ -5436,6 +6066,174 @@ interface operations {
5436
6066
  };
5437
6067
  };
5438
6068
  };
6069
+ listOwnedItems: {
6070
+ parameters: {
6071
+ query?: {
6072
+ lifecycle?: "active" | "trashed";
6073
+ rootsOnly?: "true" | "false";
6074
+ limit?: number;
6075
+ cursor?: string;
6076
+ };
6077
+ header?: never;
6078
+ path: {
6079
+ workspaceId: string;
6080
+ ownerUserId: string;
6081
+ };
6082
+ cookie?: never;
6083
+ };
6084
+ requestBody?: never;
6085
+ responses: {
6086
+ /** @description Owned items in item-ID order with an authenticated 15-minute continuation; no total count. */
6087
+ 200: {
6088
+ headers: {
6089
+ [name: string]: unknown;
6090
+ };
6091
+ content: {
6092
+ "application/json": {
6093
+ items: {
6094
+ activeVisitorGrantCount: number;
6095
+ archived: boolean;
6096
+ createdAtEpochMilliseconds: number | null;
6097
+ creatorUserId: string | null;
6098
+ currentVersion: {
6099
+ byteLength: number;
6100
+ mediaType: string;
6101
+ /** @enum {string} */
6102
+ protectionClassification: "ordinary" | "opaque-encrypted";
6103
+ /** @enum {string} */
6104
+ state: "current";
6105
+ versionId: string;
6106
+ } | null;
6107
+ etag: string;
6108
+ itemId: string;
6109
+ /** @enum {string} */
6110
+ lifecycleState: "active" | "trashed";
6111
+ modifiedAtEpochMilliseconds: number | null;
6112
+ name: string;
6113
+ ownerUserId: string;
6114
+ /** @enum {string} */
6115
+ ownership: "assigned" | "creator";
6116
+ parentId: string | null;
6117
+ /** @enum {string} */
6118
+ provider: "managed";
6119
+ purgeAfterEpochMilliseconds: number | null;
6120
+ revision: number;
6121
+ trashedAtEpochMilliseconds: number | null;
6122
+ /** @enum {string} */
6123
+ type: "file" | "folder";
6124
+ /** @enum {string} */
6125
+ visibility: "workspace" | "restricted";
6126
+ volumeId: string;
6127
+ workspaceId: string;
6128
+ }[];
6129
+ nextCursor: string | null;
6130
+ };
6131
+ };
6132
+ };
6133
+ /** @description A valid Drive user bearer credential is required. */
6134
+ 401: {
6135
+ headers: {
6136
+ [name: string]: unknown;
6137
+ };
6138
+ content: {
6139
+ "application/json": {
6140
+ error: {
6141
+ /** @enum {string} */
6142
+ code: "authentication_required";
6143
+ details: Record<string, never>;
6144
+ message: string;
6145
+ requestId: string;
6146
+ };
6147
+ };
6148
+ };
6149
+ };
6150
+ /** @description The caller is not an owner or administrator of this organization workspace, or managed storage is disabled. */
6151
+ 403: {
6152
+ headers: {
6153
+ [name: string]: unknown;
6154
+ };
6155
+ content: {
6156
+ "application/json": {
6157
+ error: {
6158
+ /** @enum {string} */
6159
+ code: "permission_denied";
6160
+ details: Record<string, never>;
6161
+ message: string;
6162
+ requestId: string;
6163
+ };
6164
+ };
6165
+ };
6166
+ };
6167
+ /** @description The workspace or item is absent or undiscoverable. */
6168
+ 404: {
6169
+ headers: {
6170
+ [name: string]: unknown;
6171
+ };
6172
+ content: {
6173
+ "application/json": {
6174
+ error: {
6175
+ /** @enum {string} */
6176
+ code: "resource_not_found";
6177
+ details: Record<string, never>;
6178
+ message: string;
6179
+ requestId: string;
6180
+ };
6181
+ };
6182
+ };
6183
+ };
6184
+ /** @description The selected authority or page changed; restart the query. */
6185
+ 409: {
6186
+ headers: {
6187
+ [name: string]: unknown;
6188
+ };
6189
+ content: {
6190
+ "application/json": {
6191
+ error: {
6192
+ /** @enum {string} */
6193
+ code: "precondition_failed";
6194
+ details: Record<string, never>;
6195
+ message: string;
6196
+ requestId: string;
6197
+ };
6198
+ };
6199
+ };
6200
+ };
6201
+ /** @description The path, query, cursor or unexpected body is invalid. */
6202
+ 422: {
6203
+ headers: {
6204
+ [name: string]: unknown;
6205
+ };
6206
+ content: {
6207
+ "application/json": {
6208
+ error: {
6209
+ /** @enum {string} */
6210
+ code: "invalid_request" | "invalid_pagination_cursor";
6211
+ details: Record<string, never>;
6212
+ message: string;
6213
+ requestId: string;
6214
+ };
6215
+ };
6216
+ };
6217
+ };
6218
+ /** @description Identity, Auth membership, D1, authorization or capacity authority is unavailable. */
6219
+ 503: {
6220
+ headers: {
6221
+ [name: string]: unknown;
6222
+ };
6223
+ content: {
6224
+ "application/json": {
6225
+ error: {
6226
+ /** @enum {string} */
6227
+ code: "identity_authority_unavailable" | "service_unavailable";
6228
+ details: Record<string, never>;
6229
+ message: string;
6230
+ requestId: string;
6231
+ };
6232
+ };
6233
+ };
6234
+ };
6235
+ };
6236
+ };
5439
6237
  searchWorkspaceItems: {
5440
6238
  parameters: {
5441
6239
  query: {
@@ -5666,6 +6464,15 @@ interface operations {
5666
6464
  "content-type": string;
5667
6465
  /** @enum {string} */
5668
6466
  "if-none-match": "*";
6467
+ } | {
6468
+ "content-md5": string;
6469
+ "content-type": string;
6470
+ /** @enum {string} */
6471
+ "if-none-match": "*";
6472
+ /** @enum {string} */
6473
+ "x-amz-server-side-encryption-customer-algorithm": "AES256";
6474
+ "x-amz-server-side-encryption-customer-key": string;
6475
+ "x-amz-server-side-encryption-customer-key-md5": string;
5669
6476
  };
5670
6477
  /** @enum {string} */
5671
6478
  method: "PUT";
@@ -5704,6 +6511,15 @@ interface operations {
5704
6511
  "content-type": string;
5705
6512
  /** @enum {string} */
5706
6513
  "if-none-match": "*";
6514
+ } | {
6515
+ "content-md5": string;
6516
+ "content-type": string;
6517
+ /** @enum {string} */
6518
+ "if-none-match": "*";
6519
+ /** @enum {string} */
6520
+ "x-amz-server-side-encryption-customer-algorithm": "AES256";
6521
+ "x-amz-server-side-encryption-customer-key": string;
6522
+ "x-amz-server-side-encryption-customer-key-md5": string;
5707
6523
  };
5708
6524
  /** @enum {string} */
5709
6525
  method: "PUT";
@@ -5865,7 +6681,7 @@ interface operations {
5865
6681
  code: "service_unavailable";
5866
6682
  details: {
5867
6683
  /** @enum {string} */
5868
- reason?: "upload_admission_saturated" | "upload_admission_stalled" | "unspecified";
6684
+ reason?: "upload_admission_saturated" | "upload_admission_stalled" | "ownership_unchanged" | "ownership_successor_not_member" | "ownership_restricted_items" | "ownership_subtree_too_large" | "external_sharing_disabled" | "unspecified";
5869
6685
  };
5870
6686
  /** @enum {string} */
5871
6687
  message: "The service is temporarily unavailable.";
@@ -6411,6 +7227,12 @@ interface operations {
6411
7227
  expiresAtEpochMilliseconds: number;
6412
7228
  headers: {
6413
7229
  "content-md5": string;
7230
+ } | {
7231
+ "content-md5": string;
7232
+ /** @enum {string} */
7233
+ "x-amz-server-side-encryption-customer-algorithm": "AES256";
7234
+ "x-amz-server-side-encryption-customer-key": string;
7235
+ "x-amz-server-side-encryption-customer-key-md5": string;
6414
7236
  };
6415
7237
  /** @enum {string} */
6416
7238
  method: "PUT";
@@ -7095,6 +7917,63 @@ interface ListWorkspaceItemsInput extends GetWorkspaceUsageInput {
7095
7917
  readonly limit?: number;
7096
7918
  readonly cursor?: string;
7097
7919
  }
7920
+ type GeneratedOwnedItemPage = JsonResponse<"listOwnedItems", 200>;
7921
+ /** One item a member effectively owns: an assigned owner, otherwise its recorded creator. */
7922
+ type OwnedItem = Readonly<Omit<GeneratedOwnedItemPage["items"][number], "currentVersion"> & {
7923
+ readonly currentVersion: ManagedItemMetadata["currentVersion"];
7924
+ }>;
7925
+ type OwnedItemPage = Readonly<{
7926
+ items: readonly OwnedItem[];
7927
+ nextCursor: string | null;
7928
+ }>;
7929
+ interface ListOwnedItemsInput {
7930
+ readonly workspaceId: string;
7931
+ /** The Auth User ID whose effectively owned items to list. */
7932
+ readonly ownerUserId: string;
7933
+ /** `active` (default) lists live items; `trashed` lists trash roots, including archived items. */
7934
+ readonly lifecycle?: "active" | "trashed";
7935
+ /** Only items whose parent the same user does not own, so each owned subtree appears once. */
7936
+ readonly rootsOnly?: boolean;
7937
+ readonly limit?: number;
7938
+ readonly cursor?: string;
7939
+ readonly signal?: AbortSignal;
7940
+ }
7941
+ interface CollectOwnedItemsInput extends Omit<ListOwnedItemsInput, "cursor" | "limit"> {
7942
+ /** Upper bound on collected items, from 1 to 500; defaults to 500. */
7943
+ readonly maxItems?: number;
7944
+ }
7945
+ type CollectedOwnedItems = Readonly<{
7946
+ items: readonly OwnedItem[];
7947
+ /** False when `maxItems` was reached before the listing ended; continue with `nextCursor`. */
7948
+ complete: boolean;
7949
+ nextCursor: string | null;
7950
+ }>;
7951
+ type ItemOwnershipTransfer = Readonly<JsonResponse<"transferItemOwnership", 200>>;
7952
+ interface TransferItemOwnershipInput {
7953
+ readonly workspaceId: string;
7954
+ readonly itemId: string;
7955
+ /** The Auth User ID of a current member of the workspace organization. */
7956
+ readonly ownerUserId: string;
7957
+ /** Also transfer active descendants that answer to the same previous owner (at most 500 walked items). */
7958
+ readonly includeDescendants: boolean;
7959
+ /** Revoke active visitor links the previous owner created on the transferred items. */
7960
+ readonly revokeVisitorGrants: boolean;
7961
+ readonly idempotencyKey: operations["transferItemOwnership"]["parameters"]["header"]["Idempotency-Key"];
7962
+ readonly ifMatch: operations["transferItemOwnership"]["parameters"]["header"]["If-Match"];
7963
+ readonly signal?: AbortSignal;
7964
+ }
7965
+ type ArchivedItem = Readonly<JsonResponse<"archiveItem", 200>>;
7966
+ /**
7967
+ * The current organization workspace's external-sharing policy. When `externalSharing` is `disabled`,
7968
+ * Drive refuses and ignores visitor links and outside-recipient grants for every item in the workspace.
7969
+ */
7970
+ type WorkspaceSharingPolicy = Readonly<JsonResponse<"getWorkspaceSharingPolicy", 200>>;
7971
+ interface UpdateWorkspaceSharingPolicyInput {
7972
+ readonly externalSharing: "allowed" | "disabled";
7973
+ /** The `validators.etag` of the policy this change is based on. */
7974
+ readonly ifMatch: string;
7975
+ readonly signal?: AbortSignal;
7976
+ }
7098
7977
  type GeneratedCurrentWorkspaceSources = JsonResponse<"getCurrentWorkspaceSources", 200>;
7099
7978
  type CurrentWorkspaceSources = Readonly<Omit<GeneratedCurrentWorkspaceSources, "workspace" | "volumes" | "knownProviders"> & {
7100
7979
  readonly workspace: CurrentWorkspace;
@@ -7260,7 +8139,7 @@ type UpdateItemInput = Readonly<UpdateItemPath> & Readonly<UpdateItemBody> & {
7260
8139
  readonly ifMatch: UpdateItemHeaders["If-Match"];
7261
8140
  readonly signal?: AbortSignal;
7262
8141
  };
7263
- type LifecycleMutationInput<Name extends "trashItem" | "restoreItem" | "deleteItem"> = Readonly<operations[Name]["parameters"]["path"]> & {
8142
+ type LifecycleMutationInput<Name extends "trashItem" | "restoreItem" | "deleteItem" | "archiveItem"> = Readonly<operations[Name]["parameters"]["path"]> & {
7264
8143
  readonly idempotencyKey: operations[Name]["parameters"]["header"]["Idempotency-Key"];
7265
8144
  readonly ifMatch: operations[Name]["parameters"]["header"]["If-Match"];
7266
8145
  readonly signal?: AbortSignal;
@@ -7268,6 +8147,7 @@ type LifecycleMutationInput<Name extends "trashItem" | "restoreItem" | "deleteIt
7268
8147
  type TrashItemInput = LifecycleMutationInput<"trashItem">;
7269
8148
  type RestoreItemInput = LifecycleMutationInput<"restoreItem">;
7270
8149
  type DeleteItemInput = LifecycleMutationInput<"deleteItem">;
8150
+ type ArchiveItemInput = LifecycleMutationInput<"archiveItem">;
7271
8151
  type ListItemVersionsInput = Readonly<ListItemVersionsPath> & Readonly<ListItemVersionsQuery> & {
7272
8152
  readonly signal?: AbortSignal;
7273
8153
  };
@@ -7342,6 +8222,11 @@ interface DriveOperations {
7342
8222
  listIncomingShares(input?: ListIncomingSharesInput): Promise<DriveOperationResult<IncomingSharePage, 200>>;
7343
8223
  listWorkspaceItems(input: ListWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceDiscoveryPage, 200>>;
7344
8224
  getWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<WorkspaceUsage, 200>>;
8225
+ listOwnedItems(input: ListOwnedItemsInput): Promise<DriveOperationResult<OwnedItemPage, 200>>;
8226
+ transferItemOwnership(input: TransferItemOwnershipInput): Promise<DriveOperationResult<ItemOwnershipTransfer, 200>>;
8227
+ archiveItem(input: ArchiveItemInput): Promise<DriveOperationResult<ArchivedItem, 200>>;
8228
+ getWorkspaceSharingPolicy(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<WorkspaceSharingPolicy, 200>>;
8229
+ updateWorkspaceSharingPolicy(input: UpdateWorkspaceSharingPolicyInput): Promise<DriveOperationResult<WorkspaceSharingPolicy, 200>>;
7345
8230
  getCurrentWorkspaceSources(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspaceSources, 200>>;
7346
8231
  getCurrentWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
7347
8232
  ensureOrganizationWorkspaceAccess(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
@@ -7422,4 +8307,4 @@ interface DriveClient extends DriveOperations {
7422
8307
  uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
7423
8308
  }
7424
8309
  //#endregion
7425
- export { ListItemSharingPeopleInput as $, WorkspaceDiscoveryPage as $t, DriveVisitorClient as A, UploadCompletion as At, FolderPage as B, UploadStatus as Bt, DriveEditingClientConfig as C, RestoreItemVersionInput as Ct, DriveResponseValidators as D, TrashItemInput as Dt, DriveOperations as E, SearchWorkspaceItemsInput as Et, EditingSessionCreation as F, UploadFileProgressCallback as Ft, GetVisitorGrantInput as G, VisitorEditingSession as Gt, GetItemInput as H, VisitorChildren as Ht, EffectivePermissionAction as I, UploadFileVersionInput as It, IncomingSharePage as J, VisitorGrantPage as Jt, GetWorkspaceUsageInput as K, VisitorGrant as Kt, EffectivePermissionResponse as L, UploadPartDescriptor as Lt, EditingFileMetadata as M, UploadFileInput as Mt, EditingFileVersionInput as N, UploadFilePhase as Nt, DriveServerClient as O, UpdateItemInput as Ot, EditingSession as P, UploadFileProgress as Pt, ListItemPermissionsInput as Q, WorkspaceDiscoveryItem as Qt, FileAccessContext as R, UploadPartResult as Rt, DriveEditingClient as S, RestoreItemInput as St, DriveOperationResult as T, RevokeVisitorGrantInput as Tt, GetItemVersionInput as U, VisitorChildrenInput as Ut, GetCurrentWorkspaceInput as V, UploadVerificationMode as Vt, GetUploadStatusInput as W, VisitorDownloadInput as Wt, ListFolderChildrenInput as X, VisitorReadInput as Xt, ItemSharingPeoplePage as Y, VisitorItem as Yt, ListIncomingSharesInput as Z, VisitorSession as Zt, DownloadItemResult as _, ReadEffectiveItemPermissionsInput as _t, CreateDownloadInput as a, ManagedItemVersion as at, DriveCredentialContext as b, RegisterItemRecipientInput as bt, CreateFolderInput as c, ManagedItemVersionRestoreResult as ct, CreateUploadPartDescriptorInput as d, PermissionAction as dt, WorkspaceItemSearchItem as en, ListItemVersionsInput as et, CreateVisitorEditingSessionInput as f, PermissionGrant as ft, DeleteItemInput as g, ProtectionClassification as gt, CurrentWorkspaceSources as h, PermissionPage as ht, CompleteUploadInput as i, ManagedItemMetadata as it, DriveVisitorClientConfig as j, UploadConfirmedPart as jt, DriveServerClientConfig as k, UpdateItemPermissionInput as kt, CreateItemPermissionInput as l, ManagedLifecycleItem as lt, CurrentWorkspace as m, PermissionMutation as mt, ChangeEditingSessionInput as n, WorkspaceUsage as nn, ManagedDownloadDescriptor as nt, CreateEditingSessionInput as o, ManagedItemVersionPage as ot, CreateVisitorGrantInput as p, PermissionGrantee as pt, IncomingShareContext as q, VisitorGrantCreation as qt, CommitFileVersionInput as r, operations as rn, ManagedDownloadRestorePending as rt, CreateFileVersionUploadInput as s, ManagedItemVersionResource as st, AbortUploadInput as t, WorkspaceItemSearchPage as tn, ListWorkspaceItemsInput as tt, CreateUploadInput as u, PendingUpload as ut, DriveClient as v, ReadyUpload as vt, DriveEditingServerClient as w, RevokeItemPermissionInput as wt, DriveCredentialProvider as x, RegisteredRecipientDisplay as xt, DriveClientConfig as y, RecordUploadPartInput as yt, FolderItem as z, UploadSession as zt };
8310
+ export { ItemOwnershipTransfer as $, VisitorChildrenInput as $t, DriveOperations as A, RestoreItemInput as At, EffectivePermissionAction as B, UploadCompletion as Bt, DriveClientConfig as C, PermissionPage as Ct, DriveEditingClientConfig as D, RecordUploadPartInput as Dt, DriveEditingClient as E, ReadyUpload as Et, DriveVisitorClientConfig as F, TransferItemOwnershipInput as Ft, GetCurrentWorkspaceInput as G, UploadFileProgressCallback as Gt, FileAccessContext as H, UploadFileInput as Ht, EditingFileMetadata as I, TrashItemInput as It, GetUploadStatusInput as J, UploadPartResult as Jt, GetItemInput as K, UploadFileVersionInput as Kt, EditingFileVersionInput as L, UpdateItemInput as Lt, DriveServerClient as M, RevokeItemPermissionInput as Mt, DriveServerClientConfig as N, RevokeVisitorGrantInput as Nt, DriveEditingServerClient as O, RegisterItemRecipientInput as Ot, DriveVisitorClient as P, SearchWorkspaceItemsInput as Pt, IncomingSharePage as Q, VisitorChildren as Qt, EditingSession as R, UpdateItemPermissionInput as Rt, DriveClient as S, PermissionMutation as St, DriveCredentialProvider as T, ReadEffectiveItemPermissionsInput as Tt, FolderItem as U, UploadFilePhase as Ut, EffectivePermissionResponse as V, UploadConfirmedPart as Vt, FolderPage as W, UploadFileProgress as Wt, GetWorkspaceUsageInput as X, UploadStatus as Xt, GetVisitorGrantInput as Y, UploadSession as Yt, IncomingShareContext as Z, UploadVerificationMode as Zt, CreateVisitorGrantInput as _, OwnedItemPage as _t, CollectOwnedItemsInput as a, VisitorItem as an, ListItemVersionsInput as at, DeleteItemInput as b, PermissionGrant as bt, CompleteUploadInput as c, WorkspaceDiscoveryItem as cn, ManagedDownloadDescriptor as ct, CreateFileVersionUploadInput as d, WorkspaceItemSearchPage as dn, ManagedItemVersion as dt, VisitorDownloadInput as en, ItemSharingPeoplePage as et, CreateFolderInput as f, WorkspaceSharingPolicy as fn, ManagedItemVersionPage as ft, CreateVisitorEditingSessionInput as g, OwnedItem as gt, CreateUploadPartDescriptorInput as h, ManagedLifecycleItem as ht, ChangeEditingSessionInput as i, VisitorGrantPage as in, ListItemSharingPeopleInput as it, DriveResponseValidators as j, RestoreItemVersionInput as jt, DriveOperationResult as k, RegisteredRecipientDisplay as kt, CreateDownloadInput as l, WorkspaceDiscoveryPage as ln, ManagedDownloadRestorePending as lt, CreateUploadInput as m, operations as mn, ManagedItemVersionRestoreResult as mt, ArchiveItemInput as n, VisitorGrant as nn, ListIncomingSharesInput as nt, CollectedOwnedItems as o, VisitorReadInput as on, ListOwnedItemsInput as ot, CreateItemPermissionInput as p, WorkspaceUsage as pn, ManagedItemVersionResource as pt, GetItemVersionInput as q, UploadPartDescriptor as qt, ArchivedItem as r, VisitorGrantCreation as rn, ListItemPermissionsInput as rt, CommitFileVersionInput as s, VisitorSession as sn, ListWorkspaceItemsInput as st, AbortUploadInput as t, VisitorEditingSession as tn, ListFolderChildrenInput as tt, CreateEditingSessionInput as u, WorkspaceItemSearchItem as un, ManagedItemMetadata as ut, CurrentWorkspace as v, PendingUpload as vt, DriveCredentialContext as w, ProtectionClassification as wt, DownloadItemResult as x, PermissionGrantee as xt, CurrentWorkspaceSources as y, PermissionAction as yt, EditingSessionCreation as z, UpdateWorkspaceSharingPolicyInput as zt };