@finueva/drive 0.23.0 → 0.25.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.
@@ -289,6 +289,278 @@ interface operations {
289
289
  };
290
290
  };
291
291
  };
292
+ prepareVerifiedTransfer: {
293
+ parameters: {
294
+ query?: never;
295
+ header?: never;
296
+ path?: never;
297
+ cookie?: never;
298
+ };
299
+ requestBody: {
300
+ content: {
301
+ "application/json": {
302
+ byteLength: number;
303
+ idempotencyKey: string;
304
+ mediaType: string;
305
+ /** @enum {string} */
306
+ protectionClassification: "ordinary" | "opaque-encrypted";
307
+ sha256: string;
308
+ target: {
309
+ name: string;
310
+ parentItemId: string;
311
+ /** @constant */
312
+ type: "create";
313
+ } | {
314
+ currentVersionId: string;
315
+ itemId: string;
316
+ /** @constant */
317
+ type: "replace";
318
+ };
319
+ workspaceId: string;
320
+ };
321
+ };
322
+ };
323
+ responses: {
324
+ /** @description Current canonical transfer admission or exact replay result. */
325
+ 200: {
326
+ headers: {
327
+ [name: string]: unknown;
328
+ };
329
+ content: {
330
+ "application/json": {
331
+ capability: {
332
+ expiresInSeconds: number;
333
+ headers: {
334
+ [key: string]: string;
335
+ };
336
+ /** @constant */
337
+ method: "PUT";
338
+ /** @constant */
339
+ outcome: "presigned";
340
+ /** Format: uri */
341
+ url: string;
342
+ };
343
+ expiresAt: number;
344
+ itemId: string;
345
+ /** @constant */
346
+ outcome: "admitted";
347
+ transferId: string;
348
+ versionId: string;
349
+ } | {
350
+ /** @constant */
351
+ outcome: "recovery_required";
352
+ transferId: string;
353
+ } | {
354
+ byteLength: number;
355
+ etag: string;
356
+ item: {
357
+ creatorUserId: string | null;
358
+ name: string | null;
359
+ ownerUserId: string | null;
360
+ parentItemId: string | null;
361
+ revision: number;
362
+ /** @enum {string} */
363
+ visibility: "workspace" | "restricted";
364
+ };
365
+ itemId: string;
366
+ mediaType: string;
367
+ /** @constant */
368
+ outcome: "published";
369
+ /** @enum {string} */
370
+ protectionClassification: "ordinary" | "opaque-encrypted";
371
+ sha256: string;
372
+ transferId: string;
373
+ versionId: string;
374
+ workspaceId: string;
375
+ };
376
+ };
377
+ };
378
+ /** @description Current workspace credential required. */
379
+ 401: {
380
+ headers: {
381
+ [name: string]: unknown;
382
+ };
383
+ content?: never;
384
+ };
385
+ /** @description The original transfer operation has retired and cannot be recreated. */
386
+ 409: {
387
+ headers: {
388
+ [name: string]: unknown;
389
+ };
390
+ content?: never;
391
+ };
392
+ /** @description Invalid or oversized transfer identity. */
393
+ 422: {
394
+ headers: {
395
+ [name: string]: unknown;
396
+ };
397
+ content?: never;
398
+ };
399
+ /** @description Current authority, persistence or provider proof unavailable. */
400
+ 503: {
401
+ headers: {
402
+ [name: string]: unknown;
403
+ };
404
+ content?: never;
405
+ };
406
+ };
407
+ };
408
+ publishVerifiedTransfer: {
409
+ parameters: {
410
+ query?: never;
411
+ header?: never;
412
+ path: {
413
+ transferId: string;
414
+ };
415
+ cookie?: never;
416
+ };
417
+ requestBody: {
418
+ content: {
419
+ "application/json": {
420
+ etag?: string;
421
+ idempotencyKey: string;
422
+ workspaceId: string;
423
+ };
424
+ };
425
+ };
426
+ responses: {
427
+ /** @description Verified current immutable version and metadata from its publication transaction. */
428
+ 200: {
429
+ headers: {
430
+ [name: string]: unknown;
431
+ };
432
+ content: {
433
+ "application/json": {
434
+ byteLength: number;
435
+ etag: string;
436
+ item: {
437
+ creatorUserId: string | null;
438
+ name: string | null;
439
+ ownerUserId: string | null;
440
+ parentItemId: string | null;
441
+ revision: number;
442
+ /** @enum {string} */
443
+ visibility: "workspace" | "restricted";
444
+ };
445
+ itemId: string;
446
+ mediaType: string;
447
+ /** @constant */
448
+ outcome: "published";
449
+ /** @enum {string} */
450
+ protectionClassification: "ordinary" | "opaque-encrypted";
451
+ sha256: string;
452
+ transferId: string;
453
+ versionId: string;
454
+ workspaceId: string;
455
+ };
456
+ };
457
+ };
458
+ /** @description Current workspace credential required. */
459
+ 401: {
460
+ headers: {
461
+ [name: string]: unknown;
462
+ };
463
+ content?: never;
464
+ };
465
+ /** @description The original transfer operation has retired and cannot be recreated. */
466
+ 409: {
467
+ headers: {
468
+ [name: string]: unknown;
469
+ };
470
+ content?: never;
471
+ };
472
+ /** @description Invalid or oversized transfer identity. */
473
+ 422: {
474
+ headers: {
475
+ [name: string]: unknown;
476
+ };
477
+ content?: never;
478
+ };
479
+ /** @description Current authority, persistence or provider proof unavailable. */
480
+ 503: {
481
+ headers: {
482
+ [name: string]: unknown;
483
+ };
484
+ content?: never;
485
+ };
486
+ };
487
+ };
488
+ recoverVerifiedTransfer: {
489
+ parameters: {
490
+ query?: never;
491
+ header?: never;
492
+ path: {
493
+ transferId: string;
494
+ };
495
+ cookie?: never;
496
+ };
497
+ requestBody: {
498
+ content: {
499
+ "application/json": {
500
+ idempotencyKey: string;
501
+ workspaceId: string;
502
+ };
503
+ };
504
+ };
505
+ responses: {
506
+ /** @description Original immutable capability after fresh current disclosure authorization. */
507
+ 200: {
508
+ headers: {
509
+ [name: string]: unknown;
510
+ };
511
+ content: {
512
+ "application/json": {
513
+ capability: {
514
+ expiresInSeconds: number;
515
+ headers: {
516
+ [key: string]: string;
517
+ };
518
+ /** @constant */
519
+ method: "PUT";
520
+ /** @constant */
521
+ outcome: "presigned";
522
+ /** Format: uri */
523
+ url: string;
524
+ };
525
+ expiresAt: number;
526
+ itemId: string;
527
+ /** @constant */
528
+ outcome: "admitted";
529
+ transferId: string;
530
+ versionId: string;
531
+ };
532
+ };
533
+ };
534
+ /** @description Current workspace credential required. */
535
+ 401: {
536
+ headers: {
537
+ [name: string]: unknown;
538
+ };
539
+ content?: never;
540
+ };
541
+ /** @description The original transfer operation has retired and cannot be recreated. */
542
+ 409: {
543
+ headers: {
544
+ [name: string]: unknown;
545
+ };
546
+ content?: never;
547
+ };
548
+ /** @description Invalid or oversized transfer identity. */
549
+ 422: {
550
+ headers: {
551
+ [name: string]: unknown;
552
+ };
553
+ content?: never;
554
+ };
555
+ /** @description Current authority, persistence or provider proof unavailable. */
556
+ 503: {
557
+ headers: {
558
+ [name: string]: unknown;
559
+ };
560
+ content?: never;
561
+ };
562
+ };
563
+ };
292
564
  listVisitorChildren: {
293
565
  parameters: {
294
566
  query?: {
@@ -948,52 +1220,43 @@ interface operations {
948
1220
  };
949
1221
  };
950
1222
  };
951
- getWorkspaceSharingPolicy: {
1223
+ ensurePersonalWorkspace: {
952
1224
  parameters: {
953
1225
  query?: never;
954
1226
  header?: never;
955
1227
  path?: never;
956
1228
  cookie?: never;
957
1229
  };
958
- requestBody?: never;
1230
+ requestBody: {
1231
+ content: {
1232
+ "application/json": Record<string, never>;
1233
+ };
1234
+ };
959
1235
  responses: {
960
- /** @description The current policy. Revision 0 means it was never changed (allowed). */
1236
+ /** @description The authenticated personal workspace is currently accessible. */
961
1237
  200: {
962
1238
  headers: {
963
- /** @description Policy revision for If-Match. */
964
- ETag?: string;
965
1239
  [name: string]: unknown;
966
1240
  };
967
1241
  content: {
968
1242
  "application/json": {
969
- canManage: boolean;
970
- /** @enum {string} */
971
- externalSharing: "allowed" | "disabled";
972
- revision: number;
973
- updatedAt: number | null;
1243
+ rootItemId: string;
1244
+ rootVolumeId: string;
974
1245
  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: {
1246
+ workspaceReference: {
986
1247
  /** @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;
1248
+ type: "personal";
1249
+ userId: string;
1250
+ } | {
1251
+ organizationId: string;
1252
+ /** @enum {string} */
1253
+ type: "organization";
991
1254
  };
992
1255
  };
993
1256
  };
994
1257
  };
995
- /** @description Managed storage is disabled, or (update) the caller is not an organization owner or admin. */
996
- 403: {
1258
+ /** @description A valid user credential is required. */
1259
+ 401: {
997
1260
  headers: {
998
1261
  [name: string]: unknown;
999
1262
  };
@@ -1001,16 +1264,17 @@ interface operations {
1001
1264
  "application/json": {
1002
1265
  error: {
1003
1266
  /** @enum {string} */
1004
- code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1267
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "invalid_request" | "service_unavailable";
1005
1268
  details: Record<string, never>;
1006
1269
  message: string;
1270
+ /** Format: uuid */
1007
1271
  requestId: string;
1008
1272
  };
1009
1273
  };
1010
1274
  };
1011
1275
  };
1012
- /** @description The credential selects a personal workspace or an organization workspace not available to this User. */
1013
- 404: {
1276
+ /** @description Personal authority is required or storage is disabled. */
1277
+ 403: {
1014
1278
  headers: {
1015
1279
  [name: string]: unknown;
1016
1280
  };
@@ -1018,15 +1282,16 @@ interface operations {
1018
1282
  "application/json": {
1019
1283
  error: {
1020
1284
  /** @enum {string} */
1021
- code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1285
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "invalid_request" | "service_unavailable";
1022
1286
  details: Record<string, never>;
1023
1287
  message: string;
1288
+ /** Format: uuid */
1024
1289
  requestId: string;
1025
1290
  };
1026
1291
  };
1027
1292
  };
1028
1293
  };
1029
- /** @description Unsupported query, header or body input. */
1294
+ /** @description Only an empty JSON object is accepted; no query is allowed. */
1030
1295
  422: {
1031
1296
  headers: {
1032
1297
  [name: string]: unknown;
@@ -1035,15 +1300,16 @@ interface operations {
1035
1300
  "application/json": {
1036
1301
  error: {
1037
1302
  /** @enum {string} */
1038
- code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1303
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "invalid_request" | "service_unavailable";
1039
1304
  details: Record<string, never>;
1040
1305
  message: string;
1306
+ /** Format: uuid */
1041
1307
  requestId: string;
1042
1308
  };
1043
1309
  };
1044
1310
  };
1045
1311
  };
1046
- /** @description Identity authority or storage is unavailable. */
1312
+ /** @description Current storage policy, capacity or canonical state is unavailable. */
1047
1313
  503: {
1048
1314
  headers: {
1049
1315
  [name: string]: unknown;
@@ -1052,7 +1318,122 @@ interface operations {
1052
1318
  "application/json": {
1053
1319
  error: {
1054
1320
  /** @enum {string} */
1055
- code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1321
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "invalid_request" | "service_unavailable";
1322
+ details: Record<string, never>;
1323
+ message: string;
1324
+ /** Format: uuid */
1325
+ requestId: string;
1326
+ };
1327
+ };
1328
+ };
1329
+ };
1330
+ };
1331
+ };
1332
+ getWorkspaceSharingPolicy: {
1333
+ parameters: {
1334
+ query?: never;
1335
+ header?: never;
1336
+ path?: never;
1337
+ cookie?: never;
1338
+ };
1339
+ requestBody?: never;
1340
+ responses: {
1341
+ /** @description The current policy. Revision 0 means it was never changed (allowed). */
1342
+ 200: {
1343
+ headers: {
1344
+ /** @description Policy revision for If-Match. */
1345
+ ETag?: string;
1346
+ [name: string]: unknown;
1347
+ };
1348
+ content: {
1349
+ "application/json": {
1350
+ canManage: boolean;
1351
+ /** @enum {string} */
1352
+ externalSharing: "allowed" | "disabled";
1353
+ revision: number;
1354
+ updatedAt: number | null;
1355
+ workspaceId: string;
1356
+ };
1357
+ };
1358
+ };
1359
+ /** @description A valid Drive user credential is required. */
1360
+ 401: {
1361
+ headers: {
1362
+ [name: string]: unknown;
1363
+ };
1364
+ content: {
1365
+ "application/json": {
1366
+ error: {
1367
+ /** @enum {string} */
1368
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1369
+ details: Record<string, never>;
1370
+ message: string;
1371
+ requestId: string;
1372
+ };
1373
+ };
1374
+ };
1375
+ };
1376
+ /** @description Managed storage is disabled, or (update) the caller is not an organization owner or admin. */
1377
+ 403: {
1378
+ headers: {
1379
+ [name: string]: unknown;
1380
+ };
1381
+ content: {
1382
+ "application/json": {
1383
+ error: {
1384
+ /** @enum {string} */
1385
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1386
+ details: Record<string, never>;
1387
+ message: string;
1388
+ requestId: string;
1389
+ };
1390
+ };
1391
+ };
1392
+ };
1393
+ /** @description The credential selects a personal workspace or an organization workspace not available to this User. */
1394
+ 404: {
1395
+ headers: {
1396
+ [name: string]: unknown;
1397
+ };
1398
+ content: {
1399
+ "application/json": {
1400
+ error: {
1401
+ /** @enum {string} */
1402
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1403
+ details: Record<string, never>;
1404
+ message: string;
1405
+ requestId: string;
1406
+ };
1407
+ };
1408
+ };
1409
+ };
1410
+ /** @description Unsupported query, header or body input. */
1411
+ 422: {
1412
+ headers: {
1413
+ [name: string]: unknown;
1414
+ };
1415
+ content: {
1416
+ "application/json": {
1417
+ error: {
1418
+ /** @enum {string} */
1419
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1420
+ details: Record<string, never>;
1421
+ message: string;
1422
+ requestId: string;
1423
+ };
1424
+ };
1425
+ };
1426
+ };
1427
+ /** @description Identity authority or storage is unavailable. */
1428
+ 503: {
1429
+ headers: {
1430
+ [name: string]: unknown;
1431
+ };
1432
+ content: {
1433
+ "application/json": {
1434
+ error: {
1435
+ /** @enum {string} */
1436
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "precondition_failed" | "service_unavailable";
1056
1437
  details: Record<string, never>;
1057
1438
  message: string;
1058
1439
  requestId: string;
@@ -5490,206 +5871,6 @@ interface operations {
5490
5871
  };
5491
5872
  };
5492
5873
  };
5493
- createFileVersionUpload: {
5494
- parameters: {
5495
- query?: never;
5496
- header: {
5497
- "Idempotency-Key": string;
5498
- "If-Match": string;
5499
- };
5500
- path: {
5501
- workspaceId: string;
5502
- itemId: string;
5503
- };
5504
- cookie?: never;
5505
- };
5506
- requestBody: {
5507
- content: {
5508
- "application/json": {
5509
- byteLength: number;
5510
- contentMd5?: string;
5511
- digest: string;
5512
- expectedVersionId: string;
5513
- /** @constant */
5514
- singleIntegrity?: "sha256";
5515
- };
5516
- };
5517
- };
5518
- responses: {
5519
- /** @description Exact replay of the admitted checkpoint upload. */
5520
- 200: {
5521
- headers: {
5522
- [name: string]: unknown;
5523
- };
5524
- content: {
5525
- "application/json": {
5526
- expiresAtEpochMilliseconds: number;
5527
- itemId: string;
5528
- /** @enum {string} */
5529
- mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
5530
- /** @enum {number} */
5531
- partByteLength: 33554432;
5532
- partCount: number;
5533
- revision: number;
5534
- singleUpload?: {
5535
- descriptor: {
5536
- expectedByteLength: number;
5537
- expiresAtEpochMilliseconds: number;
5538
- headers: {
5539
- "content-md5": string;
5540
- "content-type": string;
5541
- /** @enum {string} */
5542
- "if-none-match": "*";
5543
- } | {
5544
- "content-md5": string;
5545
- "content-type": string;
5546
- /** @enum {string} */
5547
- "if-none-match": "*";
5548
- /** @enum {string} */
5549
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
5550
- "x-amz-server-side-encryption-customer-key": string;
5551
- "x-amz-server-side-encryption-customer-key-md5": string;
5552
- } | {
5553
- /** @enum {string} */
5554
- "cache-control": "no-store, no-transform";
5555
- "content-type": string;
5556
- /** @enum {string} */
5557
- "if-none-match": "*";
5558
- "x-amz-checksum-sha256": string;
5559
- } | {
5560
- /** @enum {string} */
5561
- "cache-control": "no-store, no-transform";
5562
- "content-type": string;
5563
- /** @enum {string} */
5564
- "if-none-match": "*";
5565
- "x-amz-checksum-sha256": string;
5566
- /** @enum {string} */
5567
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
5568
- "x-amz-server-side-encryption-customer-key": string;
5569
- "x-amz-server-side-encryption-customer-key-md5": string;
5570
- };
5571
- /** @enum {string} */
5572
- method: "PUT";
5573
- /** Format: uri */
5574
- url: string;
5575
- } | null;
5576
- /** @enum {string} */
5577
- state: "uploading" | "completing" | "ready";
5578
- };
5579
- uploadId: string;
5580
- versionId: string;
5581
- };
5582
- };
5583
- };
5584
- /** @description New checkpoint upload using ordinary archive multipart operations. */
5585
- 201: {
5586
- headers: {
5587
- [name: string]: unknown;
5588
- };
5589
- content: {
5590
- "application/json": {
5591
- expiresAtEpochMilliseconds: number;
5592
- itemId: string;
5593
- /** @enum {string} */
5594
- mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
5595
- /** @enum {number} */
5596
- partByteLength: 33554432;
5597
- partCount: number;
5598
- revision: number;
5599
- singleUpload?: {
5600
- descriptor: {
5601
- expectedByteLength: number;
5602
- expiresAtEpochMilliseconds: number;
5603
- headers: {
5604
- "content-md5": string;
5605
- "content-type": string;
5606
- /** @enum {string} */
5607
- "if-none-match": "*";
5608
- } | {
5609
- "content-md5": string;
5610
- "content-type": string;
5611
- /** @enum {string} */
5612
- "if-none-match": "*";
5613
- /** @enum {string} */
5614
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
5615
- "x-amz-server-side-encryption-customer-key": string;
5616
- "x-amz-server-side-encryption-customer-key-md5": string;
5617
- } | {
5618
- /** @enum {string} */
5619
- "cache-control": "no-store, no-transform";
5620
- "content-type": string;
5621
- /** @enum {string} */
5622
- "if-none-match": "*";
5623
- "x-amz-checksum-sha256": string;
5624
- } | {
5625
- /** @enum {string} */
5626
- "cache-control": "no-store, no-transform";
5627
- "content-type": string;
5628
- /** @enum {string} */
5629
- "if-none-match": "*";
5630
- "x-amz-checksum-sha256": string;
5631
- /** @enum {string} */
5632
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
5633
- "x-amz-server-side-encryption-customer-key": string;
5634
- "x-amz-server-side-encryption-customer-key-md5": string;
5635
- };
5636
- /** @enum {string} */
5637
- method: "PUT";
5638
- /** Format: uri */
5639
- url: string;
5640
- } | null;
5641
- /** @enum {string} */
5642
- state: "uploading" | "completing" | "ready";
5643
- };
5644
- uploadId: string;
5645
- versionId: string;
5646
- };
5647
- };
5648
- };
5649
- /** @description Drive user authentication required. */
5650
- 401: {
5651
- headers: {
5652
- [name: string]: unknown;
5653
- };
5654
- content?: never;
5655
- };
5656
- /** @description Current file update permission required. */
5657
- 403: {
5658
- headers: {
5659
- [name: string]: unknown;
5660
- };
5661
- content?: never;
5662
- };
5663
- /** @description File or upload unavailable. */
5664
- 404: {
5665
- headers: {
5666
- [name: string]: unknown;
5667
- };
5668
- content?: never;
5669
- };
5670
- /** @description Expected version, quota or idempotency conflict. */
5671
- 409: {
5672
- headers: {
5673
- [name: string]: unknown;
5674
- };
5675
- content?: never;
5676
- };
5677
- /** @description Invalid conditional version request. */
5678
- 422: {
5679
- headers: {
5680
- [name: string]: unknown;
5681
- };
5682
- content?: never;
5683
- };
5684
- /** @description Archive or persistence unavailable; retain operation identity for retry. */
5685
- 503: {
5686
- headers: {
5687
- [name: string]: unknown;
5688
- };
5689
- content?: never;
5690
- };
5691
- };
5692
- };
5693
5874
  listItemVersions: {
5694
5875
  parameters: {
5695
5876
  query?: {
@@ -6898,1041 +7079,42 @@ interface operations {
6898
7079
  };
6899
7080
  };
6900
7081
  };
6901
- createUpload: {
7082
+ getWorkspaceUsage: {
6902
7083
  parameters: {
6903
7084
  query?: never;
6904
- header: {
6905
- "Idempotency-Key": string;
6906
- };
7085
+ header?: never;
6907
7086
  path: {
6908
7087
  workspaceId: string;
6909
7088
  };
6910
7089
  cookie?: never;
6911
7090
  };
6912
- requestBody: {
6913
- content: {
6914
- "application/json": {
6915
- /** @description Caller-declared whole-file SHA-256 metadata; it is not archive verification evidence. */
6916
- callerDeclaredContentDigest: string;
6917
- /** @description Requests a conditional single PUT for a nonempty file up to 8 MiB. */
6918
- contentMd5?: string;
6919
- displayFilename: string;
6920
- expectedByteLength: number;
6921
- mediaType: string;
6922
- parentItemId: string;
6923
- /** @enum {string} */
6924
- protectionClassification: "ordinary" | "opaque-encrypted";
6925
- /**
6926
- * @description Explicitly negotiates a provider-validated full SHA256 single PUT and its exact header tuple; requires contentMd5 and a nonempty file up to 8 MiB.
6927
- * @enum {string}
6928
- */
6929
- singleIntegrity?: "sha256";
6930
- };
6931
- };
6932
- };
7091
+ requestBody?: never;
6933
7092
  responses: {
6934
- /** @description The exact retained transfer session is replayed. */
7093
+ /** @description Current committed and retained reserved bytes, not physical archive usage. */
6935
7094
  200: {
6936
7095
  headers: {
6937
7096
  [name: string]: unknown;
6938
7097
  };
6939
7098
  content: {
6940
7099
  "application/json": {
6941
- expiresAtEpochMilliseconds: number;
6942
- itemId: string;
6943
7100
  /** @enum {string} */
6944
- mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
6945
- /** @enum {number} */
6946
- partByteLength: 33554432;
6947
- partCount: number;
6948
- revision: number;
6949
- singleUpload?: {
6950
- descriptor: {
6951
- expectedByteLength: number;
6952
- expiresAtEpochMilliseconds: number;
6953
- headers: {
6954
- "content-md5": string;
6955
- "content-type": string;
6956
- /** @enum {string} */
6957
- "if-none-match": "*";
6958
- } | {
6959
- "content-md5": string;
6960
- "content-type": string;
6961
- /** @enum {string} */
6962
- "if-none-match": "*";
6963
- /** @enum {string} */
6964
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
6965
- "x-amz-server-side-encryption-customer-key": string;
6966
- "x-amz-server-side-encryption-customer-key-md5": string;
6967
- } | {
6968
- /** @enum {string} */
6969
- "cache-control": "no-store, no-transform";
6970
- "content-type": string;
6971
- /** @enum {string} */
6972
- "if-none-match": "*";
6973
- "x-amz-checksum-sha256": string;
6974
- } | {
6975
- /** @enum {string} */
6976
- "cache-control": "no-store, no-transform";
6977
- "content-type": string;
6978
- /** @enum {string} */
6979
- "if-none-match": "*";
6980
- "x-amz-checksum-sha256": string;
6981
- /** @enum {string} */
6982
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
6983
- "x-amz-server-side-encryption-customer-key": string;
6984
- "x-amz-server-side-encryption-customer-key-md5": string;
6985
- };
6986
- /** @enum {string} */
6987
- method: "PUT";
6988
- /** Format: uri */
6989
- url: string;
6990
- } | null;
6991
- /** @enum {string} */
6992
- state: "uploading" | "completing" | "ready";
6993
- };
6994
- uploadId: string;
6995
- versionId: string;
7101
+ accounting: "retained-versions-and-reservations";
7102
+ availableBytes: string;
7103
+ limitBytes: string;
7104
+ /** @enum {string} */
7105
+ provider: "managed";
7106
+ reservedBytes: string;
7107
+ /** @enum {boolean} */
7108
+ reservedBytesIncludeUnresolvedUploads: true;
7109
+ unresolvedReservedBytes: string;
7110
+ usedBytes: string;
7111
+ warnings: "unresolved-archive-ownership"[];
7112
+ workspaceId: string;
6996
7113
  };
6997
7114
  };
6998
7115
  };
6999
- /** @description The durable direct transfer session is created. */
7000
- 201: {
7001
- headers: {
7002
- [name: string]: unknown;
7003
- };
7004
- content: {
7005
- "application/json": {
7006
- expiresAtEpochMilliseconds: number;
7007
- itemId: string;
7008
- /** @enum {string} */
7009
- mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
7010
- /** @enum {number} */
7011
- partByteLength: 33554432;
7012
- partCount: number;
7013
- revision: number;
7014
- singleUpload?: {
7015
- descriptor: {
7016
- expectedByteLength: number;
7017
- expiresAtEpochMilliseconds: number;
7018
- headers: {
7019
- "content-md5": string;
7020
- "content-type": string;
7021
- /** @enum {string} */
7022
- "if-none-match": "*";
7023
- } | {
7024
- "content-md5": string;
7025
- "content-type": string;
7026
- /** @enum {string} */
7027
- "if-none-match": "*";
7028
- /** @enum {string} */
7029
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
7030
- "x-amz-server-side-encryption-customer-key": string;
7031
- "x-amz-server-side-encryption-customer-key-md5": string;
7032
- } | {
7033
- /** @enum {string} */
7034
- "cache-control": "no-store, no-transform";
7035
- "content-type": string;
7036
- /** @enum {string} */
7037
- "if-none-match": "*";
7038
- "x-amz-checksum-sha256": string;
7039
- } | {
7040
- /** @enum {string} */
7041
- "cache-control": "no-store, no-transform";
7042
- "content-type": string;
7043
- /** @enum {string} */
7044
- "if-none-match": "*";
7045
- "x-amz-checksum-sha256": string;
7046
- /** @enum {string} */
7047
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
7048
- "x-amz-server-side-encryption-customer-key": string;
7049
- "x-amz-server-side-encryption-customer-key-md5": string;
7050
- };
7051
- /** @enum {string} */
7052
- method: "PUT";
7053
- /** Format: uri */
7054
- url: string;
7055
- } | null;
7056
- /** @enum {string} */
7057
- state: "uploading" | "completing" | "ready";
7058
- };
7059
- uploadId: string;
7060
- versionId: string;
7061
- };
7062
- };
7063
- };
7064
- /** @description A valid Drive user bearer credential is required. */
7065
- 401: {
7066
- headers: {
7067
- [name: string]: unknown;
7068
- };
7069
- content: {
7070
- "application/json": {
7071
- error: {
7072
- /** @enum {string} */
7073
- code: "authentication_required";
7074
- details: Record<string, never>;
7075
- /** @enum {string} */
7076
- message: "Authentication is required.";
7077
- requestId: string;
7078
- };
7079
- };
7080
- };
7081
- };
7082
- /** @description Managed storage is disabled or the discoverable parent does not permit item creation. */
7083
- 403: {
7084
- headers: {
7085
- [name: string]: unknown;
7086
- };
7087
- content: {
7088
- "application/json": {
7089
- error: {
7090
- /** @enum {string} */
7091
- code: "permission_denied";
7092
- details: Record<string, never>;
7093
- /** @enum {string} */
7094
- message: "The requested action is not permitted.";
7095
- requestId: string;
7096
- };
7097
- };
7098
- };
7099
- };
7100
- /** @description The parent is absent or undiscoverable. */
7101
- 404: {
7102
- headers: {
7103
- [name: string]: unknown;
7104
- };
7105
- content: {
7106
- "application/json": {
7107
- error: {
7108
- /** @enum {string} */
7109
- code: "resource_not_found";
7110
- details: Record<string, never>;
7111
- /** @enum {string} */
7112
- message: "The requested resource was not found.";
7113
- requestId: string;
7114
- };
7115
- };
7116
- };
7117
- };
7118
- /** @description Quota is exceeded, the key conflicts, authority changed, or provider-create recovery is required. */
7119
- 409: {
7120
- headers: {
7121
- [name: string]: unknown;
7122
- };
7123
- content: {
7124
- "application/json": {
7125
- error: {
7126
- /** @enum {string} */
7127
- code: "quota_exceeded";
7128
- details: Record<string, never>;
7129
- /** @enum {string} */
7130
- message: "The workspace storage quota would be exceeded.";
7131
- requestId: string;
7132
- };
7133
- } | {
7134
- error: {
7135
- /** @enum {string} */
7136
- code: "idempotency_conflict";
7137
- details: Record<string, never>;
7138
- /** @enum {string} */
7139
- message: "The idempotency key conflicts with an earlier request.";
7140
- requestId: string;
7141
- };
7142
- } | {
7143
- error: {
7144
- /** @enum {string} */
7145
- code: "precondition_failed";
7146
- details: Record<string, never>;
7147
- /** @enum {string} */
7148
- message: "The request precondition failed.";
7149
- requestId: string;
7150
- };
7151
- } | {
7152
- error: {
7153
- /** @enum {string} */
7154
- code: "upload_recovery_required";
7155
- details: Record<string, never>;
7156
- /** @enum {string} */
7157
- message: "The upload requires recovery before it can continue.";
7158
- requestId: string;
7159
- };
7160
- };
7161
- };
7162
- };
7163
- /** @description The path, key, media type, or strict request body is invalid. */
7164
- 422: {
7165
- headers: {
7166
- [name: string]: unknown;
7167
- };
7168
- content: {
7169
- "application/json": {
7170
- error: {
7171
- /** @enum {string} */
7172
- code: "invalid_request";
7173
- details: Record<string, never>;
7174
- /** @enum {string} */
7175
- message: "The request is invalid.";
7176
- requestId: string;
7177
- };
7178
- } | {
7179
- error: {
7180
- /** @enum {string} */
7181
- code: "invalid_idempotency_key";
7182
- details: Record<string, never>;
7183
- /** @enum {string} */
7184
- message: "The idempotency key is invalid.";
7185
- requestId: string;
7186
- };
7187
- };
7188
- };
7189
- };
7190
- /** @description Identity, D1, authorization, entitlement, or trusted capacity authority is unavailable. An admission refusal carries the caller-facing reason. */
7191
- 503: {
7192
- headers: {
7193
- [name: string]: unknown;
7194
- };
7195
- content: {
7196
- "application/json": {
7197
- error: {
7198
- /** @enum {string} */
7199
- code: "identity_authority_unavailable";
7200
- details: Record<string, never>;
7201
- /** @enum {string} */
7202
- message: "Authentication is temporarily unavailable.";
7203
- requestId: string;
7204
- };
7205
- } | {
7206
- error: {
7207
- /** @enum {string} */
7208
- code: "service_unavailable";
7209
- details: {
7210
- /** @enum {string} */
7211
- reason?: "upload_admission_saturated" | "upload_admission_stalled" | "ownership_unchanged" | "ownership_successor_not_member" | "ownership_restricted_items" | "ownership_subtree_too_large" | "external_sharing_disabled" | "unspecified";
7212
- };
7213
- /** @enum {string} */
7214
- message: "The service is temporarily unavailable.";
7215
- requestId: string;
7216
- };
7217
- };
7218
- };
7219
- };
7220
- };
7221
- };
7222
- getUploadStatus: {
7223
- parameters: {
7224
- query?: {
7225
- afterPartNumber?: string;
7226
- limit?: string;
7227
- };
7228
- header?: never;
7229
- path: {
7230
- workspaceId: string;
7231
- uploadId: string;
7232
- };
7233
- cookie?: never;
7234
- };
7235
- requestBody?: never;
7236
- responses: {
7237
- /** @description The current upload lifecycle and one bounded confirmed-part page. */
7238
- 200: {
7239
- headers: {
7240
- [name: string]: unknown;
7241
- };
7242
- content: {
7243
- "application/json": {
7244
- confirmedParts: {
7245
- checksumSha256: string;
7246
- partNumber: number;
7247
- }[];
7248
- expiresAtEpochMilliseconds: number;
7249
- itemId: string;
7250
- /** @enum {string} */
7251
- lifecycle: "initiating" | "recovery-required" | "uploading" | "completing" | "provider-completed" | "verifying" | "failed" | "ready" | "aborting" | "aborted";
7252
- /** @enum {string} */
7253
- mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
7254
- nextAfterPartNumber: number | null;
7255
- partPolicy: {
7256
- /** @enum {number} */
7257
- maxParts: 10000;
7258
- /** @enum {number} */
7259
- partByteLength: 33554432;
7260
- partCount: number;
7261
- };
7262
- ready: {
7263
- byteLength: number;
7264
- /** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
7265
- callerDeclaredContentDigest: string;
7266
- displayFilename: string;
7267
- itemId: string;
7268
- mediaType: string;
7269
- /** @enum {string} */
7270
- state: "ready";
7271
- uploadId: string;
7272
- versionId: string;
7273
- } | null;
7274
- revision: number;
7275
- uploadId: string;
7276
- verification?: {
7277
- revision: number;
7278
- /** @enum {string} */
7279
- state: "pending" | "verified" | "failed";
7280
- totalByteLength: number;
7281
- verifiedByteLength: number;
7282
- };
7283
- versionId: string;
7284
- };
7285
- };
7286
- };
7287
- /** @description Authentication is required. */
7288
- 401: {
7289
- headers: {
7290
- [name: string]: unknown;
7291
- };
7292
- content: {
7293
- "application/json": {
7294
- error: {
7295
- /** @enum {string} */
7296
- code: "authentication_required";
7297
- details: Record<string, never>;
7298
- /** @enum {string} */
7299
- message: "Authentication is required.";
7300
- requestId: string;
7301
- };
7302
- };
7303
- };
7304
- };
7305
- /** @description Permission is denied. */
7306
- 403: {
7307
- headers: {
7308
- [name: string]: unknown;
7309
- };
7310
- content: {
7311
- "application/json": {
7312
- error: {
7313
- /** @enum {string} */
7314
- code: "permission_denied";
7315
- details: Record<string, never>;
7316
- /** @enum {string} */
7317
- message: "The requested action is not permitted.";
7318
- requestId: string;
7319
- };
7320
- };
7321
- };
7322
- };
7323
- /** @description The upload is not discoverable. */
7324
- 404: {
7325
- headers: {
7326
- [name: string]: unknown;
7327
- };
7328
- content: {
7329
- "application/json": {
7330
- error: {
7331
- /** @enum {string} */
7332
- code: "resource_not_found";
7333
- details: Record<string, never>;
7334
- /** @enum {string} */
7335
- message: "The requested resource was not found.";
7336
- requestId: string;
7337
- };
7338
- };
7339
- };
7340
- };
7341
- /** @description The path, query, or unexpected request body is invalid. */
7342
- 422: {
7343
- headers: {
7344
- [name: string]: unknown;
7345
- };
7346
- content: {
7347
- "application/json": {
7348
- error: {
7349
- /** @enum {string} */
7350
- code: "invalid_request";
7351
- details: Record<string, never>;
7352
- /** @enum {string} */
7353
- message: "The request is invalid.";
7354
- requestId: string;
7355
- };
7356
- };
7357
- };
7358
- };
7359
- /** @description Identity or the service is unavailable. */
7360
- 503: {
7361
- headers: {
7362
- [name: string]: unknown;
7363
- };
7364
- content: {
7365
- "application/json": {
7366
- error: {
7367
- /** @enum {string} */
7368
- code: "identity_authority_unavailable";
7369
- details: Record<string, never>;
7370
- /** @enum {string} */
7371
- message: "Authentication is temporarily unavailable.";
7372
- requestId: string;
7373
- };
7374
- } | {
7375
- error: {
7376
- /** @enum {string} */
7377
- code: "service_unavailable";
7378
- details: Record<string, never>;
7379
- /** @enum {string} */
7380
- message: "The service is temporarily unavailable.";
7381
- requestId: string;
7382
- };
7383
- };
7384
- };
7385
- };
7386
- };
7387
- };
7388
- abortUpload: {
7389
- parameters: {
7390
- query?: never;
7391
- header?: never;
7392
- path: {
7393
- workspaceId: string;
7394
- uploadId: string;
7395
- };
7396
- cookie?: never;
7397
- };
7398
- requestBody?: never;
7399
- responses: {
7400
- /** @description The provider upload is absent and the upload is terminal. */
7401
- 204: {
7402
- headers: {
7403
- [name: string]: unknown;
7404
- };
7405
- content?: never;
7406
- };
7407
- /** @description A valid Drive user bearer credential is required. */
7408
- 401: {
7409
- headers: {
7410
- [name: string]: unknown;
7411
- };
7412
- content: {
7413
- "application/json": {
7414
- error: {
7415
- /** @enum {string} */
7416
- code: "authentication_required";
7417
- details: Record<string, never>;
7418
- /** @enum {string} */
7419
- message: "Authentication is required.";
7420
- requestId: string;
7421
- };
7422
- };
7423
- };
7424
- };
7425
- /** @description The retained parent is discoverable but no longer permits item creation. */
7426
- 403: {
7427
- headers: {
7428
- [name: string]: unknown;
7429
- };
7430
- content: {
7431
- "application/json": {
7432
- error: {
7433
- /** @enum {string} */
7434
- code: "permission_denied";
7435
- details: Record<string, never>;
7436
- /** @enum {string} */
7437
- message: "The requested action is not permitted.";
7438
- requestId: string;
7439
- };
7440
- };
7441
- };
7442
- };
7443
- /** @description The upload is unknown, cross-workspace, or its retained parent is undiscoverable. */
7444
- 404: {
7445
- headers: {
7446
- [name: string]: unknown;
7447
- };
7448
- content: {
7449
- "application/json": {
7450
- error: {
7451
- /** @enum {string} */
7452
- code: "resource_not_found";
7453
- details: Record<string, never>;
7454
- /** @enum {string} */
7455
- message: "The requested resource was not found.";
7456
- requestId: string;
7457
- };
7458
- };
7459
- };
7460
- };
7461
- /** @description Another terminal settlement won, authority changed, or provider-create recovery is required. */
7462
- 409: {
7463
- headers: {
7464
- [name: string]: unknown;
7465
- };
7466
- content: {
7467
- "application/json": {
7468
- error: {
7469
- /** @enum {string} */
7470
- code: "precondition_failed";
7471
- details: Record<string, never>;
7472
- /** @enum {string} */
7473
- message: "The request precondition failed.";
7474
- requestId: string;
7475
- };
7476
- } | {
7477
- error: {
7478
- /** @enum {string} */
7479
- code: "upload_recovery_required";
7480
- details: Record<string, never>;
7481
- /** @enum {string} */
7482
- message: "The upload requires recovery before it can continue.";
7483
- requestId: string;
7484
- };
7485
- };
7486
- };
7487
- };
7488
- /** @description The path, query, or unexpected request body is invalid. */
7489
- 422: {
7490
- headers: {
7491
- [name: string]: unknown;
7492
- };
7493
- content: {
7494
- "application/json": {
7495
- error: {
7496
- /** @enum {string} */
7497
- code: "invalid_request";
7498
- details: Record<string, never>;
7499
- /** @enum {string} */
7500
- message: "The request is invalid.";
7501
- requestId: string;
7502
- };
7503
- };
7504
- };
7505
- };
7506
- /** @description Identity, D1, authorization, or retained capacity authority is unavailable. */
7507
- 503: {
7508
- headers: {
7509
- [name: string]: unknown;
7510
- };
7511
- content: {
7512
- "application/json": {
7513
- error: {
7514
- /** @enum {string} */
7515
- code: "identity_authority_unavailable";
7516
- details: Record<string, never>;
7517
- /** @enum {string} */
7518
- message: "Authentication is temporarily unavailable.";
7519
- requestId: string;
7520
- };
7521
- } | {
7522
- error: {
7523
- /** @enum {string} */
7524
- code: "service_unavailable";
7525
- details: Record<string, never>;
7526
- /** @enum {string} */
7527
- message: "The service is temporarily unavailable.";
7528
- requestId: string;
7529
- };
7530
- };
7531
- };
7532
- };
7533
- };
7534
- };
7535
- completeUpload: {
7536
- parameters: {
7537
- query?: {
7538
- verification?: string;
7539
- };
7540
- header: {
7541
- "Idempotency-Key": string;
7542
- };
7543
- path: {
7544
- workspaceId: string;
7545
- uploadId: string;
7546
- };
7547
- cookie?: never;
7548
- };
7549
- requestBody?: never;
7550
- responses: {
7551
- /** @description The verified current version is ready. */
7552
- 200: {
7553
- headers: {
7554
- [name: string]: unknown;
7555
- };
7556
- content: {
7557
- "application/json": {
7558
- byteLength: number;
7559
- /** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
7560
- callerDeclaredContentDigest: string;
7561
- displayFilename: string;
7562
- itemId: string;
7563
- mediaType: string;
7564
- /** @enum {string} */
7565
- state: "ready";
7566
- uploadId: string;
7567
- versionId: string;
7568
- };
7569
- };
7570
- };
7571
- /** @description Archive verification is pending; retry completion with the same key. */
7572
- 202: {
7573
- headers: {
7574
- [name: string]: unknown;
7575
- };
7576
- content: {
7577
- "application/json": {
7578
- itemId: string;
7579
- /** @enum {string} */
7580
- state: "verifying";
7581
- totalByteLength: number;
7582
- uploadId: string;
7583
- verificationRevision: number;
7584
- verifiedByteLength: number;
7585
- versionId: string;
7586
- };
7587
- };
7588
- };
7589
- /** @description Authentication is required. */
7590
- 401: {
7591
- headers: {
7592
- [name: string]: unknown;
7593
- };
7594
- content: {
7595
- "application/json": {
7596
- error: {
7597
- /** @enum {string} */
7598
- code: "authentication_required";
7599
- details: Record<string, never>;
7600
- /** @enum {string} */
7601
- message: "Authentication is required.";
7602
- requestId: string;
7603
- };
7604
- };
7605
- };
7606
- };
7607
- /** @description Permission is denied. */
7608
- 403: {
7609
- headers: {
7610
- [name: string]: unknown;
7611
- };
7612
- content: {
7613
- "application/json": {
7614
- error: {
7615
- /** @enum {string} */
7616
- code: "permission_denied";
7617
- details: Record<string, never>;
7618
- /** @enum {string} */
7619
- message: "The requested action is not permitted.";
7620
- requestId: string;
7621
- };
7622
- };
7623
- };
7624
- };
7625
- /** @description The upload is not discoverable. */
7626
- 404: {
7627
- headers: {
7628
- [name: string]: unknown;
7629
- };
7630
- content: {
7631
- "application/json": {
7632
- error: {
7633
- /** @enum {string} */
7634
- code: "resource_not_found";
7635
- details: Record<string, never>;
7636
- /** @enum {string} */
7637
- message: "The requested resource was not found.";
7638
- requestId: string;
7639
- };
7640
- };
7641
- };
7642
- };
7643
- /** @description The upload is incomplete, conflicts, or requires recovery. */
7644
- 409: {
7645
- headers: {
7646
- [name: string]: unknown;
7647
- };
7648
- content: {
7649
- "application/json": {
7650
- error: {
7651
- /** @enum {string} */
7652
- code: "precondition_failed";
7653
- details: Record<string, never>;
7654
- /** @enum {string} */
7655
- message: "The request precondition failed.";
7656
- requestId: string;
7657
- };
7658
- } | {
7659
- error: {
7660
- /** @enum {string} */
7661
- code: "upload_recovery_required";
7662
- details: Record<string, never>;
7663
- /** @enum {string} */
7664
- message: "The upload requires recovery before it can continue.";
7665
- requestId: string;
7666
- };
7667
- };
7668
- };
7669
- };
7670
- /** @description The request is invalid. */
7671
- 422: {
7672
- headers: {
7673
- [name: string]: unknown;
7674
- };
7675
- content: {
7676
- "application/json": {
7677
- error: {
7678
- /** @enum {string} */
7679
- code: "invalid_request";
7680
- details: Record<string, never>;
7681
- /** @enum {string} */
7682
- message: "The request is invalid.";
7683
- requestId: string;
7684
- };
7685
- } | {
7686
- error: {
7687
- /** @enum {string} */
7688
- code: "invalid_idempotency_key";
7689
- details: Record<string, never>;
7690
- /** @enum {string} */
7691
- message: "The idempotency key is invalid.";
7692
- requestId: string;
7693
- };
7694
- };
7695
- };
7696
- };
7697
- /** @description Identity or the service is unavailable. */
7698
- 503: {
7699
- headers: {
7700
- [name: string]: unknown;
7701
- };
7702
- content: {
7703
- "application/json": {
7704
- error: {
7705
- /** @enum {string} */
7706
- code: "identity_authority_unavailable";
7707
- details: Record<string, never>;
7708
- /** @enum {string} */
7709
- message: "Authentication is temporarily unavailable.";
7710
- requestId: string;
7711
- };
7712
- } | {
7713
- error: {
7714
- /** @enum {string} */
7715
- code: "service_unavailable";
7716
- details: Record<string, never>;
7717
- /** @enum {string} */
7718
- message: "The service is temporarily unavailable.";
7719
- requestId: string;
7720
- };
7721
- };
7722
- };
7723
- };
7724
- };
7725
- };
7726
- createUploadPartDescriptor: {
7727
- parameters: {
7728
- query?: never;
7729
- header?: never;
7730
- path: {
7731
- workspaceId: string;
7732
- uploadId: string;
7733
- };
7734
- cookie?: never;
7735
- };
7736
- requestBody: {
7737
- content: {
7738
- "application/json": {
7739
- checksumSha256: string;
7740
- contentMd5: string;
7741
- partNumber: number;
7742
- };
7743
- };
7744
- };
7745
- responses: {
7746
- /** @description One short-lived exact part capability. */
7747
- 200: {
7748
- headers: {
7749
- [name: string]: unknown;
7750
- };
7751
- content: {
7752
- "application/json": {
7753
- expectedByteLength: number;
7754
- expiresAtEpochMilliseconds: number;
7755
- headers: {
7756
- "content-md5": string;
7757
- } | {
7758
- "content-md5": string;
7759
- /** @enum {string} */
7760
- "x-amz-server-side-encryption-customer-algorithm": "AES256";
7761
- "x-amz-server-side-encryption-customer-key": string;
7762
- "x-amz-server-side-encryption-customer-key-md5": string;
7763
- };
7764
- /** @enum {string} */
7765
- method: "PUT";
7766
- partNumber: number;
7767
- /** Format: uri */
7768
- url: string;
7769
- };
7770
- };
7771
- };
7772
- /** @description Authentication is required. */
7773
- 401: {
7774
- headers: {
7775
- [name: string]: unknown;
7776
- };
7777
- content: {
7778
- "application/json": {
7779
- error: {
7780
- /** @enum {string} */
7781
- code: "authentication_required";
7782
- details: Record<string, never>;
7783
- /** @enum {string} */
7784
- message: "Authentication is required.";
7785
- requestId: string;
7786
- };
7787
- };
7788
- };
7789
- };
7790
- /** @description Permission is denied. */
7791
- 403: {
7792
- headers: {
7793
- [name: string]: unknown;
7794
- };
7795
- content: {
7796
- "application/json": {
7797
- error: {
7798
- /** @enum {string} */
7799
- code: "permission_denied";
7800
- details: Record<string, never>;
7801
- /** @enum {string} */
7802
- message: "The requested action is not permitted.";
7803
- requestId: string;
7804
- };
7805
- };
7806
- };
7807
- };
7808
- /** @description The upload is not discoverable. */
7809
- 404: {
7810
- headers: {
7811
- [name: string]: unknown;
7812
- };
7813
- content: {
7814
- "application/json": {
7815
- error: {
7816
- /** @enum {string} */
7817
- code: "resource_not_found";
7818
- details: Record<string, never>;
7819
- /** @enum {string} */
7820
- message: "The requested resource was not found.";
7821
- requestId: string;
7822
- };
7823
- };
7824
- };
7825
- };
7826
- /** @description The upload or part conflicts or requires recovery. */
7827
- 409: {
7828
- headers: {
7829
- [name: string]: unknown;
7830
- };
7831
- content: {
7832
- "application/json": {
7833
- error: {
7834
- /** @enum {string} */
7835
- code: "precondition_failed";
7836
- details: Record<string, never>;
7837
- /** @enum {string} */
7838
- message: "The request precondition failed.";
7839
- requestId: string;
7840
- };
7841
- } | {
7842
- error: {
7843
- /** @enum {string} */
7844
- code: "upload_recovery_required";
7845
- details: Record<string, never>;
7846
- /** @enum {string} */
7847
- message: "The upload requires recovery before it can continue.";
7848
- requestId: string;
7849
- };
7850
- };
7851
- };
7852
- };
7853
- /** @description The request is invalid. */
7854
- 422: {
7855
- headers: {
7856
- [name: string]: unknown;
7857
- };
7858
- content: {
7859
- "application/json": {
7860
- error: {
7861
- /** @enum {string} */
7862
- code: "invalid_request";
7863
- details: Record<string, never>;
7864
- /** @enum {string} */
7865
- message: "The request is invalid.";
7866
- requestId: string;
7867
- };
7868
- };
7869
- };
7870
- };
7871
- /** @description Identity or the service is unavailable. */
7872
- 503: {
7873
- headers: {
7874
- [name: string]: unknown;
7875
- };
7876
- content: {
7877
- "application/json": {
7878
- error: {
7879
- /** @enum {string} */
7880
- code: "identity_authority_unavailable";
7881
- details: Record<string, never>;
7882
- /** @enum {string} */
7883
- message: "Authentication is temporarily unavailable.";
7884
- requestId: string;
7885
- };
7886
- } | {
7887
- error: {
7888
- /** @enum {string} */
7889
- code: "service_unavailable";
7890
- details: Record<string, never>;
7891
- /** @enum {string} */
7892
- message: "The service is temporarily unavailable.";
7893
- requestId: string;
7894
- };
7895
- };
7896
- };
7897
- };
7898
- };
7899
- };
7900
- recordUploadPart: {
7901
- parameters: {
7902
- query?: never;
7903
- header?: never;
7904
- path: {
7905
- workspaceId: string;
7906
- uploadId: string;
7907
- partNumber: string;
7908
- };
7909
- cookie?: never;
7910
- };
7911
- requestBody: {
7912
- content: {
7913
- "application/json": {
7914
- byteLength: number;
7915
- checksumSha256: string;
7916
- etag: string;
7917
- expectedUploadRevision: number;
7918
- };
7919
- };
7920
- };
7921
- responses: {
7922
- /** @description The callback is retained or exactly replayed. */
7923
- 200: {
7924
- headers: {
7925
- [name: string]: unknown;
7926
- };
7927
- content: {
7928
- "application/json": {
7929
- partNumber: number;
7930
- revision: number;
7931
- };
7932
- };
7933
- };
7934
- /** @description Authentication is required. */
7935
- 401: {
7116
+ /** @description Authentication required. */
7117
+ 401: {
7936
7118
  headers: {
7937
7119
  [name: string]: unknown;
7938
7120
  };
@@ -7940,16 +7122,15 @@ interface operations {
7940
7122
  "application/json": {
7941
7123
  error: {
7942
7124
  /** @enum {string} */
7943
- code: "authentication_required";
7125
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
7944
7126
  details: Record<string, never>;
7945
- /** @enum {string} */
7946
- message: "Authentication is required.";
7127
+ message: string;
7947
7128
  requestId: string;
7948
7129
  };
7949
7130
  };
7950
7131
  };
7951
7132
  };
7952
- /** @description Permission is denied. */
7133
+ /** @description The action is not permitted. */
7953
7134
  403: {
7954
7135
  headers: {
7955
7136
  [name: string]: unknown;
@@ -7958,16 +7139,15 @@ interface operations {
7958
7139
  "application/json": {
7959
7140
  error: {
7960
7141
  /** @enum {string} */
7961
- code: "permission_denied";
7142
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
7962
7143
  details: Record<string, never>;
7963
- /** @enum {string} */
7964
- message: "The requested action is not permitted.";
7144
+ message: string;
7965
7145
  requestId: string;
7966
7146
  };
7967
7147
  };
7968
7148
  };
7969
7149
  };
7970
- /** @description The upload is not discoverable. */
7150
+ /** @description Workspace not found. */
7971
7151
  404: {
7972
7152
  headers: {
7973
7153
  [name: string]: unknown;
@@ -7976,16 +7156,15 @@ interface operations {
7976
7156
  "application/json": {
7977
7157
  error: {
7978
7158
  /** @enum {string} */
7979
- code: "resource_not_found";
7159
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
7980
7160
  details: Record<string, never>;
7981
- /** @enum {string} */
7982
- message: "The requested resource was not found.";
7161
+ message: string;
7983
7162
  requestId: string;
7984
7163
  };
7985
7164
  };
7986
7165
  };
7987
7166
  };
7988
- /** @description The callback conflicts or requires recovery. */
7167
+ /** @description The selected authority or page changed; restart the query. */
7989
7168
  409: {
7990
7169
  headers: {
7991
7170
  [name: string]: unknown;
@@ -7994,25 +7173,15 @@ interface operations {
7994
7173
  "application/json": {
7995
7174
  error: {
7996
7175
  /** @enum {string} */
7997
- code: "precondition_failed";
7998
- details: Record<string, never>;
7999
- /** @enum {string} */
8000
- message: "The request precondition failed.";
8001
- requestId: string;
8002
- };
8003
- } | {
8004
- error: {
8005
- /** @enum {string} */
8006
- code: "upload_recovery_required";
7176
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
8007
7177
  details: Record<string, never>;
8008
- /** @enum {string} */
8009
- message: "The upload requires recovery before it can continue.";
7178
+ message: string;
8010
7179
  requestId: string;
8011
7180
  };
8012
7181
  };
8013
7182
  };
8014
7183
  };
8015
- /** @description The request is invalid. */
7184
+ /** @description Invalid request or cursor. */
8016
7185
  422: {
8017
7186
  headers: {
8018
7187
  [name: string]: unknown;
@@ -8021,16 +7190,15 @@ interface operations {
8021
7190
  "application/json": {
8022
7191
  error: {
8023
7192
  /** @enum {string} */
8024
- code: "invalid_request";
7193
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
8025
7194
  details: Record<string, never>;
8026
- /** @enum {string} */
8027
- message: "The request is invalid.";
7195
+ message: string;
8028
7196
  requestId: string;
8029
7197
  };
8030
7198
  };
8031
7199
  };
8032
7200
  };
8033
- /** @description Identity or the service is unavailable. */
7201
+ /** @description Authoritative state is unavailable. */
8034
7202
  503: {
8035
7203
  headers: {
8036
7204
  [name: string]: unknown;
@@ -8039,19 +7207,9 @@ interface operations {
8039
7207
  "application/json": {
8040
7208
  error: {
8041
7209
  /** @enum {string} */
8042
- code: "identity_authority_unavailable";
8043
- details: Record<string, never>;
8044
- /** @enum {string} */
8045
- message: "Authentication is temporarily unavailable.";
8046
- requestId: string;
8047
- };
8048
- } | {
8049
- error: {
8050
- /** @enum {string} */
8051
- code: "service_unavailable";
7210
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
8052
7211
  details: Record<string, never>;
8053
- /** @enum {string} */
8054
- message: "The service is temporarily unavailable.";
7212
+ message: string;
8055
7213
  requestId: string;
8056
7214
  };
8057
7215
  };
@@ -8059,110 +7217,7 @@ interface operations {
8059
7217
  };
8060
7218
  };
8061
7219
  };
8062
- commitFileVersion: {
8063
- parameters: {
8064
- query?: never;
8065
- header: {
8066
- "Idempotency-Key": string;
8067
- "If-Match": string;
8068
- };
8069
- path: {
8070
- workspaceId: string;
8071
- uploadId: string;
8072
- };
8073
- cookie?: never;
8074
- };
8075
- requestBody: {
8076
- content: {
8077
- "application/json": {
8078
- expectedVersionId: string;
8079
- };
8080
- };
8081
- };
8082
- responses: {
8083
- /** @description Archive verified and exact-version checkpoint committed or replayed. */
8084
- 200: {
8085
- headers: {
8086
- [name: string]: unknown;
8087
- };
8088
- content: {
8089
- "application/json": {
8090
- byteLength: number;
8091
- /** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
8092
- callerDeclaredContentDigest: string;
8093
- displayFilename: string;
8094
- itemId: string;
8095
- mediaType: string;
8096
- /** @enum {string} */
8097
- state: "ready";
8098
- uploadId: string;
8099
- versionId: string;
8100
- };
8101
- };
8102
- };
8103
- /** @description Archive hash verification still pending; retain the same operation identity. */
8104
- 202: {
8105
- headers: {
8106
- [name: string]: unknown;
8107
- };
8108
- content: {
8109
- "application/json": {
8110
- itemId: string;
8111
- /** @enum {string} */
8112
- state: "verifying";
8113
- totalByteLength: number;
8114
- uploadId: string;
8115
- verificationRevision: number;
8116
- verifiedByteLength: number;
8117
- versionId: string;
8118
- };
8119
- };
8120
- };
8121
- /** @description Drive user authentication required. */
8122
- 401: {
8123
- headers: {
8124
- [name: string]: unknown;
8125
- };
8126
- content?: never;
8127
- };
8128
- /** @description Current file update permission required. */
8129
- 403: {
8130
- headers: {
8131
- [name: string]: unknown;
8132
- };
8133
- content?: never;
8134
- };
8135
- /** @description File or upload unavailable. */
8136
- 404: {
8137
- headers: {
8138
- [name: string]: unknown;
8139
- };
8140
- content?: never;
8141
- };
8142
- /** @description Expected version, quota or idempotency conflict. */
8143
- 409: {
8144
- headers: {
8145
- [name: string]: unknown;
8146
- };
8147
- content?: never;
8148
- };
8149
- /** @description Invalid conditional version request. */
8150
- 422: {
8151
- headers: {
8152
- [name: string]: unknown;
8153
- };
8154
- content?: never;
8155
- };
8156
- /** @description Archive or persistence unavailable; retain operation identity for retry. */
8157
- 503: {
8158
- headers: {
8159
- [name: string]: unknown;
8160
- };
8161
- content?: never;
8162
- };
8163
- };
8164
- };
8165
- getWorkspaceUsage: {
7220
+ getCurrentUserWorkspaceUsage: {
8166
7221
  parameters: {
8167
7222
  query?: never;
8168
7223
  header?: never;
@@ -8173,7 +7228,7 @@ interface operations {
8173
7228
  };
8174
7229
  requestBody?: never;
8175
7230
  responses: {
8176
- /** @description Current committed and retained reserved bytes, not physical archive usage. */
7231
+ /** @description Own current files, including trash; shared organization quota is not organization usage. */
8177
7232
  200: {
8178
7233
  headers: {
8179
7234
  [name: string]: unknown;
@@ -8181,17 +7236,14 @@ interface operations {
8181
7236
  content: {
8182
7237
  "application/json": {
8183
7238
  /** @enum {string} */
8184
- accounting: "current-versions-and-reservations";
8185
- availableBytes: string;
7239
+ accounting: "owned-current-versions";
7240
+ fileCount: number;
8186
7241
  limitBytes: string;
8187
7242
  /** @enum {string} */
8188
7243
  provider: "managed";
8189
- reservedBytes: string;
8190
- /** @enum {boolean} */
8191
- reservedBytesIncludeUnresolvedUploads: true;
8192
- unresolvedReservedBytes: string;
7244
+ /** @enum {string} */
7245
+ quotaScope: "personal" | "organization";
8193
7246
  usedBytes: string;
8194
- warnings: "unresolved-archive-ownership"[];
8195
7247
  workspaceId: string;
8196
7248
  };
8197
7249
  };
@@ -8315,12 +7367,32 @@ type JsonRequest<Name extends keyof operations> = operations[Name] extends {
8315
7367
  };
8316
7368
  };
8317
7369
  } ? Body : never;
8318
- type CreateFileVersionUploadInput = Readonly<JsonRequest<"createFileVersionUpload"> & {
8319
- workspaceId: string;
8320
- itemId: string;
8321
- idempotencyKey: string;
7370
+ type PrepareVerifiedTransferInput = Readonly<JsonRequest<"prepareVerifiedTransfer"> & {
7371
+ signal?: AbortSignal;
7372
+ }>;
7373
+ type PreparedVerifiedTransfer = Readonly<JsonResponse<"prepareVerifiedTransfer", 200>>;
7374
+ type AdmittedVerifiedTransfer = Extract<PreparedVerifiedTransfer, {
7375
+ outcome: "admitted";
7376
+ }>;
7377
+ type PublishedVerifiedTransfer = Readonly<JsonResponse<"publishVerifiedTransfer", 200>>;
7378
+ type PublishVerifiedTransferInput = Readonly<JsonRequest<"publishVerifiedTransfer"> & {
7379
+ transferId: string;
7380
+ signal?: AbortSignal;
7381
+ }>;
7382
+ type RecoverVerifiedTransferInput = Readonly<JsonRequest<"recoverVerifiedTransfer"> & {
7383
+ transferId: string;
8322
7384
  signal?: AbortSignal;
8323
7385
  }>;
7386
+ type UploadVerifiedFileInput = Readonly<Omit<PrepareVerifiedTransferInput, "byteLength" | "sha256"> & {
7387
+ source: Blob;
7388
+ completionIdempotencyKey: string;
7389
+ onProgress?: UploadFileProgressCallback;
7390
+ }>;
7391
+ interface VerifiedTransferOperations {
7392
+ prepareVerifiedTransfer(input: PrepareVerifiedTransferInput): Promise<DriveOperationResult<PreparedVerifiedTransfer, 200>>;
7393
+ publishVerifiedTransfer(input: PublishVerifiedTransferInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
7394
+ recoverVerifiedTransfer(input: RecoverVerifiedTransferInput): Promise<DriveOperationResult<AdmittedVerifiedTransfer, 200>>;
7395
+ }
8324
7396
  type FileAccessContext = Readonly<JsonResponse<"getFileAccessContext", 200>>;
8325
7397
  type EditingSession = Readonly<JsonResponse<"changeEditingSession", 200>>;
8326
7398
  type EditingSessionCreation = Readonly<JsonResponse<"createEditingSession", 201>>;
@@ -8337,26 +7409,10 @@ interface DriveEditingClientConfig {
8337
7409
  readonly fetch?: typeof globalThis.fetch;
8338
7410
  readonly timeoutMilliseconds?: number;
8339
7411
  }
8340
- type DriveEditingServerClient = Pick<DriveOperations, "getFileAccessContext" | "createDownload" | "downloadItem" | "createFileVersionUpload" | "commitFileVersion" | "getUploadStatus" | "createUploadPartDescriptor" | "recordUploadPart" | "abortUpload">;
8341
- interface EditingFileMetadata {
8342
- readonly parentItemId: string;
8343
- readonly displayFilename: string;
8344
- readonly mediaType: string;
8345
- readonly protectionClassification: ProtectionClassification;
8346
- }
8347
- type EditingFileVersionInput = UploadFileVersionInput & {
8348
- readonly metadata: EditingFileMetadata;
8349
- };
7412
+ type DriveEditingServerClient = VerifiedTransferOperations & Pick<DriveOperations, "getFileAccessContext" | "createDownload" | "downloadItem">;
8350
7413
  type DriveEditingClient = DriveEditingServerClient & {
8351
- uploadFileVersion(input: EditingFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
7414
+ uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
8352
7415
  };
8353
- type CommitFileVersionInput = Readonly<JsonRequest<"commitFileVersion"> & {
8354
- workspaceId: string;
8355
- itemId: string;
8356
- uploadId: string;
8357
- idempotencyKey: string;
8358
- signal?: AbortSignal;
8359
- }>;
8360
7416
  type ResourcePath = operations["listFolderChildren"]["parameters"]["path"];
8361
7417
  type PageQuery = NonNullable<operations["listFolderChildren"]["parameters"]["query"]>;
8362
7418
  type SearchWorkspaceItemsPath = operations["searchWorkspaceItems"]["parameters"]["path"];
@@ -8368,16 +7424,6 @@ type CreateFolderHeaders = operations["createFolder"]["parameters"]["header"];
8368
7424
  type CreatePermissionHeaders = operations["createItemPermission"]["parameters"]["header"];
8369
7425
  type GrantMutationPath = operations["updateItemPermission"]["parameters"]["path"];
8370
7426
  type GrantMutationHeaders = operations["updateItemPermission"]["parameters"]["header"];
8371
- type CreateUploadPath = operations["createUpload"]["parameters"]["path"];
8372
- type CreateUploadHeaders = operations["createUpload"]["parameters"]["header"];
8373
- type CreateUploadBody = JsonRequest<"createUpload">;
8374
- type UploadPath = operations["abortUpload"]["parameters"]["path"];
8375
- type UploadStatusPath = operations["getUploadStatus"]["parameters"]["path"];
8376
- type CreateUploadPartDescriptorBody = JsonRequest<"createUploadPartDescriptor">;
8377
- type RecordUploadPartPath = operations["recordUploadPart"]["parameters"]["path"];
8378
- type RecordUploadPartBody = JsonRequest<"recordUploadPart">;
8379
- type CompleteUploadHeaders = operations["completeUpload"]["parameters"]["header"];
8380
- type AbortUploadPath = operations["abortUpload"]["parameters"]["path"];
8381
7427
  type UpdateItemPath = operations["updateItem"]["parameters"]["path"];
8382
7428
  type UpdateItemHeaders = operations["updateItem"]["parameters"]["header"];
8383
7429
  type UpdateItemBody = JsonRequest<"updateItem">;
@@ -8428,6 +7474,7 @@ type WorkspaceDiscoveryPage = Readonly<{
8428
7474
  items: readonly WorkspaceDiscoveryItem[];
8429
7475
  nextCursor: string | null;
8430
7476
  }>;
7477
+ type CurrentUserWorkspaceUsage = Readonly<JsonResponse<"getCurrentUserWorkspaceUsage", 200>>;
8431
7478
  type GeneratedWorkspaceUsage = JsonResponse<"getWorkspaceUsage", 200>;
8432
7479
  type WorkspaceUsage = Readonly<Omit<GeneratedWorkspaceUsage, "warnings"> & {
8433
7480
  readonly warnings: readonly GeneratedWorkspaceUsage["warnings"][number][];
@@ -8511,14 +7558,6 @@ type CurrentWorkspace = Readonly<Omit<GeneratedCurrentWorkspace, "workspaceRefer
8511
7558
  readonly workspaceReference: Readonly<GeneratedCurrentWorkspace["workspaceReference"]>;
8512
7559
  }>;
8513
7560
  type FolderItem = Readonly<JsonResponse<"createFolder", 201>>;
8514
- type UploadSession = Readonly<JsonResponse<"createUpload", 201>>;
8515
- type UploadPartDescriptor = Readonly<Omit<JsonResponse<"createUploadPartDescriptor", 200>, "headers"> & {
8516
- readonly headers: Readonly<JsonResponse<"createUploadPartDescriptor", 200>["headers"]>;
8517
- }>;
8518
- type UploadPartResult = Readonly<JsonResponse<"recordUploadPart", 200>>;
8519
- type ReadyUpload = Readonly<JsonResponse<"completeUpload", 200>>;
8520
- type PendingUpload = Readonly<JsonResponse<"completeUpload", 202>>;
8521
- type UploadCompletion = ReadyUpload | PendingUpload;
8522
7561
  type ManagedLifecycleItem = Readonly<JsonResponse<"updateItem", 200>>;
8523
7562
  type GeneratedManagedItemMetadata = JsonResponse<"getItem", 200>;
8524
7563
  type ManagedItemMetadata = Readonly<Omit<GeneratedManagedItemMetadata, "currentVersion"> & {
@@ -8543,15 +7582,7 @@ type ManagedDownloadDescriptor = Readonly<Omit<JsonResponse<"createDownload", 20
8543
7582
  readonly response: Readonly<JsonResponse<"createDownload", 200>["response"]>;
8544
7583
  }>;
8545
7584
  type ManagedDownloadRestorePending = Readonly<JsonResponse<"createDownload", 202>>;
8546
- type GeneratedUploadStatus = JsonResponse<"getUploadStatus", 200>;
8547
- type UploadConfirmedPart = Readonly<GeneratedUploadStatus["confirmedParts"][number]>;
8548
- type UploadStatus = Readonly<Omit<GeneratedUploadStatus, "confirmedParts" | "partPolicy" | "ready" | "verification"> & {
8549
- readonly confirmedParts: readonly UploadConfirmedPart[];
8550
- readonly partPolicy: Readonly<GeneratedUploadStatus["partPolicy"]>;
8551
- readonly ready: ReadyUpload | null;
8552
- readonly verification?: Readonly<NonNullable<GeneratedUploadStatus["verification"]>>;
8553
- }>;
8554
- type ProtectionClassification = CreateUploadBody["protectionClassification"];
7585
+ type ProtectionClassification = PrepareVerifiedTransferInput["protectionClassification"];
8555
7586
  type PermissionAction = CreatePermissionBody["actions"][number];
8556
7587
  type PermissionGrantee = Readonly<CreatePermissionBody["grantee"]>;
8557
7588
  type GeneratedPermissionGrant = JsonResponse<"listItemPermissions", 200>["items"][number];
@@ -8632,35 +7663,6 @@ type UpdateItemPermissionInput = GrantMutationInput & Readonly<Omit<UpdatePermis
8632
7663
  readonly actions?: readonly PermissionAction[];
8633
7664
  };
8634
7665
  type RevokeItemPermissionInput = GrantMutationInput;
8635
- type CreateUploadInput = Readonly<CreateUploadPath> & Readonly<CreateUploadBody> & {
8636
- readonly idempotencyKey: CreateUploadHeaders["Idempotency-Key"];
8637
- readonly signal?: AbortSignal;
8638
- };
8639
- type CreateUploadPartDescriptorInput = Readonly<UploadPath> & Readonly<CreateUploadPartDescriptorBody> & {
8640
- readonly signal?: AbortSignal;
8641
- };
8642
- type GetUploadStatusInput = Readonly<UploadStatusPath> & {
8643
- readonly afterPartNumber?: number;
8644
- readonly limit?: number;
8645
- readonly signal?: AbortSignal;
8646
- };
8647
- type RecordUploadPartInput = Readonly<Omit<RecordUploadPartPath, "partNumber">> & Readonly<RecordUploadPartBody> & {
8648
- readonly partNumber: number;
8649
- readonly signal?: AbortSignal;
8650
- };
8651
- /**
8652
- * `deferred` (the default) answers `202` with a `verifying` upload as soon as Drive has the object and can
8653
- * hash it on its queue; `inline` waits for that hash and publishes inside the same request.
8654
- */
8655
- type UploadVerificationMode = "deferred" | "inline";
8656
- type CompleteUploadInput = Readonly<UploadPath> & {
8657
- readonly idempotencyKey: CompleteUploadHeaders["Idempotency-Key"];
8658
- readonly verification?: UploadVerificationMode;
8659
- readonly signal?: AbortSignal;
8660
- };
8661
- type AbortUploadInput = Readonly<AbortUploadPath> & {
8662
- readonly signal?: AbortSignal;
8663
- };
8664
7666
  type UpdateItemInput = Readonly<UpdateItemPath> & Readonly<UpdateItemBody> & {
8665
7667
  readonly idempotencyKey: UpdateItemHeaders["Idempotency-Key"];
8666
7668
  readonly ifMatch: UpdateItemHeaders["If-Match"];
@@ -8705,33 +7707,6 @@ interface UploadFileProgress {
8705
7707
  readonly totalPartCount: number;
8706
7708
  }
8707
7709
  type UploadFileProgressCallback = (progress: UploadFileProgress) => void;
8708
- interface UploadFileInput {
8709
- /** Opt in only after the service supports provider-validated single-object SHA256 receipts. */
8710
- readonly singleIntegrity?: "sha256";
8711
- readonly workspaceId: string;
8712
- readonly parentItemId: string;
8713
- readonly source: Blob;
8714
- readonly displayFilename: string;
8715
- readonly mediaType?: string;
8716
- readonly protectionClassification?: ProtectionClassification;
8717
- readonly idempotencyKey: string;
8718
- readonly completionIdempotencyKey: string;
8719
- /** Defaults to `deferred`: `uploadFile` then resolves with a `verifying` completion the caller settles later. */
8720
- readonly verification?: UploadVerificationMode;
8721
- readonly signal?: AbortSignal;
8722
- readonly onProgress?: UploadFileProgressCallback;
8723
- }
8724
- interface UploadFileVersionInput {
8725
- readonly singleIntegrity?: "sha256";
8726
- readonly workspaceId: string;
8727
- readonly itemId: string;
8728
- readonly expectedVersionId: string;
8729
- readonly source: Blob;
8730
- readonly idempotencyKey: string;
8731
- readonly completionIdempotencyKey: string;
8732
- readonly signal?: AbortSignal;
8733
- readonly onProgress?: UploadFileProgressCallback;
8734
- }
8735
7710
  interface GetCurrentWorkspaceInput {
8736
7711
  readonly signal?: AbortSignal;
8737
7712
  }
@@ -8741,8 +7716,6 @@ interface DriveOperations {
8741
7716
  closeEditingSession(input: ChangeEditingSessionInput): Promise<DriveOperationResult<EditingSession, 200>>;
8742
7717
  revokeEditingSession(input: ChangeEditingSessionInput): Promise<DriveOperationResult<EditingSession, 200>>;
8743
7718
  getFileAccessContext(input: GetItemInput): Promise<DriveOperationResult<FileAccessContext, 200>>;
8744
- createFileVersionUpload(input: CreateFileVersionUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
8745
- commitFileVersion(input: CommitFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
8746
7719
  createVisitorGrant(input: CreateVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
8747
7720
  getVisitorGrant(input: GetVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
8748
7721
  listVisitorGrants(input: GetItemInput): Promise<DriveOperationResult<VisitorGrantPage, 200>>;
@@ -8751,6 +7724,7 @@ interface DriveOperations {
8751
7724
  listItemSharingPeople(input: ListItemSharingPeopleInput): Promise<DriveOperationResult<ItemSharingPeoplePage, 200>>;
8752
7725
  listIncomingShares(input?: ListIncomingSharesInput): Promise<DriveOperationResult<IncomingSharePage, 200>>;
8753
7726
  listWorkspaceItems(input: ListWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceDiscoveryPage, 200>>;
7727
+ getCurrentUserWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<CurrentUserWorkspaceUsage, 200>>;
8754
7728
  getWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<WorkspaceUsage, 200>>;
8755
7729
  listOwnedItems(input: ListOwnedItemsInput): Promise<DriveOperationResult<OwnedItemPage, 200>>;
8756
7730
  transferItemOwnership(input: TransferItemOwnershipInput): Promise<DriveOperationResult<ItemOwnershipTransfer, 200>>;
@@ -8759,6 +7733,7 @@ interface DriveOperations {
8759
7733
  updateWorkspaceSharingPolicy(input: UpdateWorkspaceSharingPolicyInput): Promise<DriveOperationResult<WorkspaceSharingPolicy, 200>>;
8760
7734
  getCurrentWorkspaceSources(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspaceSources, 200>>;
8761
7735
  getCurrentWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
7736
+ ensurePersonalWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
8762
7737
  ensureOrganizationWorkspaceAccess(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
8763
7738
  getItem(input: GetItemInput): Promise<DriveOperationResult<ManagedItemMetadata, 200>>;
8764
7739
  searchWorkspaceItems(input: SearchWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceItemSearchPage, 200>>;
@@ -8781,12 +7756,6 @@ interface DriveOperations {
8781
7756
  updateItemPermission(input: UpdateItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8782
7757
  revokeItemPermission(input: RevokeItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8783
7758
  revokeInternalItemPermission(input: RevokeItemPermissionInput): Promise<DriveOperationResult<PermissionMutation, 200>>;
8784
- createUpload(input: CreateUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
8785
- getUploadStatus(input: GetUploadStatusInput): Promise<DriveOperationResult<UploadStatus, 200>>;
8786
- createUploadPartDescriptor(input: CreateUploadPartDescriptorInput): Promise<DriveOperationResult<UploadPartDescriptor, 200>>;
8787
- recordUploadPart(input: RecordUploadPartInput): Promise<DriveOperationResult<UploadPartResult, 200>>;
8788
- completeUpload(input: CompleteUploadInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
8789
- abortUpload(input: AbortUploadInput): Promise<DriveOperationResult<undefined, 204>>;
8790
7759
  }
8791
7760
  type VisitorGrantCreation = JsonResponse<"createVisitorGrant", 200>;
8792
7761
  type VisitorGrant = VisitorGrantCreation["grant"];
@@ -8834,10 +7803,9 @@ interface DriveVisitorClient {
8834
7803
  }): Promise<DriveOperationResult<VisitorSession, 200>>;
8835
7804
  createEditingSession(input: CreateVisitorEditingSessionInput): Promise<DriveOperationResult<VisitorEditingSession, 201>>;
8836
7805
  }
8837
- interface DriveServerClient extends DriveOperations {}
8838
- interface DriveClient extends DriveOperations {
8839
- uploadFileVersion(input: UploadFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
8840
- uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
7806
+ interface DriveServerClient extends DriveOperations, VerifiedTransferOperations {}
7807
+ interface DriveClient extends DriveOperations, VerifiedTransferOperations {
7808
+ uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
8841
7809
  }
8842
7810
  //#endregion
8843
- 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 };
7811
+ export { ListOwnedItemsInput as $, WorkspaceItemSearchPage as $t, DriveVisitorClient as A, TransferItemOwnershipInput as At, GetItemInput as B, VisitorChildren as Bt, DriveEditingClientConfig as C, RegisterItemRecipientInput as Ct, DriveResponseValidators as D, RevokeItemPermissionInput as Dt, DriveOperations as E, RestoreItemVersionInput as Et, EffectivePermissionResponse as F, UploadFilePhase as Ft, IncomingSharePage as G, VisitorGrantCreation as Gt, GetVisitorGrantInput as H, VisitorDownloadInput as Ht, FileAccessContext as I, UploadFileProgress as It, ListFolderChildrenInput as J, VisitorReadInput as Jt, ItemOwnershipTransfer as K, VisitorGrantPage as Kt, FolderItem as L, UploadFileProgressCallback as Lt, EditingSession as M, UpdateItemInput as Mt, EditingSessionCreation as N, UpdateItemPermissionInput as Nt, DriveServerClient as O, RevokeVisitorGrantInput as Ot, EffectivePermissionAction as P, UpdateWorkspaceSharingPolicyInput as Pt, ListItemVersionsInput as Q, WorkspaceItemSearchItem as Qt, FolderPage as R, UploadVerifiedFileInput as Rt, DriveEditingClient as S, RecoverVerifiedTransferInput as St, DriveOperationResult as T, RestoreItemInput as Tt, GetWorkspaceUsageInput as U, VisitorEditingSession as Ut, GetItemVersionInput as V, VisitorChildrenInput as Vt, IncomingShareContext as W, VisitorGrant as Wt, ListItemPermissionsInput as X, WorkspaceDiscoveryItem as Xt, ListIncomingSharesInput as Y, VisitorSession as Yt, ListItemSharingPeopleInput as Z, WorkspaceDiscoveryPage as Zt, DownloadItemResult as _, PreparedVerifiedTransfer as _t, CollectOwnedItemsInput as a, ManagedItemVersionPage as at, DriveCredentialContext as b, PublishedVerifiedTransfer as bt, CreateEditingSessionInput as c, ManagedLifecycleItem as ct, CreateVisitorEditingSessionInput as d, PermissionAction as dt, WorkspaceSharingPolicy as en, ListWorkspaceItemsInput as et, CreateVisitorGrantInput as f, PermissionGrant as ft, DeleteItemInput as g, PrepareVerifiedTransferInput as gt, CurrentWorkspaceSources as h, PermissionPage as ht, ChangeEditingSessionInput as i, ManagedItemVersion as it, DriveVisitorClientConfig as j, TrashItemInput as jt, DriveServerClientConfig as k, SearchWorkspaceItemsInput as kt, CreateFolderInput as l, OwnedItem as lt, CurrentWorkspace as m, PermissionMutation as mt, ArchiveItemInput as n, operations as nn, ManagedDownloadRestorePending as nt, CollectedOwnedItems as o, ManagedItemVersionResource as ot, CurrentUserWorkspaceUsage as p, PermissionGrantee as pt, ItemSharingPeoplePage as q, VisitorItem as qt, ArchivedItem as r, ManagedItemMetadata as rt, CreateDownloadInput as s, ManagedItemVersionRestoreResult as st, AdmittedVerifiedTransfer as t, WorkspaceUsage as tn, ManagedDownloadDescriptor as tt, CreateItemPermissionInput as u, OwnedItemPage as ut, DriveClient as v, ProtectionClassification as vt, DriveEditingServerClient as w, RegisteredRecipientDisplay as wt, DriveCredentialProvider as x, ReadEffectiveItemPermissionsInput as xt, DriveClientConfig as y, PublishVerifiedTransferInput as yt, GetCurrentWorkspaceInput as z, VerifiedTransferOperations as zt };