@finueva/drive 0.12.0 → 0.14.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.
@@ -287,6 +287,316 @@ interface operations {
287
287
  };
288
288
  };
289
289
  };
290
+ listVisitorChildren: {
291
+ parameters: {
292
+ query?: {
293
+ itemId?: string;
294
+ after?: string;
295
+ };
296
+ header: {
297
+ /** @description DriveVisitor followed by a space and the capability. Never place tokens in URLs. */
298
+ Authorization: string;
299
+ };
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ requestBody?: never;
304
+ responses: {
305
+ /** @description Current child page. */
306
+ 200: {
307
+ headers: {
308
+ [name: string]: unknown;
309
+ };
310
+ content: {
311
+ "application/json": {
312
+ items: {
313
+ itemId: string;
314
+ /** @enum {string} */
315
+ kind: "file" | "folder";
316
+ name: string | null;
317
+ }[];
318
+ nextAfter: string | null;
319
+ };
320
+ };
321
+ };
322
+ /** @description Capability or resource unavailable. */
323
+ 404: {
324
+ headers: {
325
+ [name: string]: unknown;
326
+ };
327
+ content?: never;
328
+ };
329
+ /** @description Conflicting request identity. */
330
+ 409: {
331
+ headers: {
332
+ [name: string]: unknown;
333
+ };
334
+ content?: never;
335
+ };
336
+ /** @description Invalid request; visitor roles are viewer only. */
337
+ 422: {
338
+ headers: {
339
+ [name: string]: unknown;
340
+ };
341
+ content?: never;
342
+ };
343
+ /** @description Bounded admission exhausted; retry after one minute. */
344
+ 429: {
345
+ headers: {
346
+ [name: string]: unknown;
347
+ };
348
+ content?: never;
349
+ };
350
+ /** @description Service unavailable. */
351
+ 503: {
352
+ headers: {
353
+ [name: string]: unknown;
354
+ };
355
+ content?: never;
356
+ };
357
+ };
358
+ };
359
+ createVisitorDownload: {
360
+ parameters: {
361
+ query?: {
362
+ itemId?: string;
363
+ };
364
+ header: {
365
+ /** @description DriveVisitor followed by a space and the capability. Never place tokens in URLs. */
366
+ Authorization: string;
367
+ };
368
+ path?: never;
369
+ cookie?: never;
370
+ };
371
+ requestBody?: never;
372
+ responses: {
373
+ /** @description Native managed download descriptor. */
374
+ 200: {
375
+ headers: {
376
+ [name: string]: unknown;
377
+ };
378
+ content: {
379
+ "application/json": {
380
+ expiresAtEpochMilliseconds: number;
381
+ headers: {
382
+ [key: string]: string;
383
+ };
384
+ /** @enum {string} */
385
+ method: "GET" | "HEAD";
386
+ /** @enum {string} */
387
+ mode: "presigned-single";
388
+ response: {
389
+ /** @enum {string} */
390
+ acceptRanges: "bytes";
391
+ byteLength: number;
392
+ contentDisposition: string;
393
+ contentLength: number;
394
+ contentRange: string | null;
395
+ contentType: string;
396
+ etag: string;
397
+ status: 200 | 206;
398
+ versionId: string;
399
+ };
400
+ /** Format: uri */
401
+ url: string;
402
+ };
403
+ };
404
+ };
405
+ /** @description Not modified. */
406
+ 304: {
407
+ headers: {
408
+ [name: string]: unknown;
409
+ };
410
+ content?: never;
411
+ };
412
+ /** @description Capability or resource unavailable. */
413
+ 404: {
414
+ headers: {
415
+ [name: string]: unknown;
416
+ };
417
+ content?: never;
418
+ };
419
+ /** @description Conflicting request identity. */
420
+ 409: {
421
+ headers: {
422
+ [name: string]: unknown;
423
+ };
424
+ content?: never;
425
+ };
426
+ /** @description Precondition failed. */
427
+ 412: {
428
+ headers: {
429
+ [name: string]: unknown;
430
+ };
431
+ content?: never;
432
+ };
433
+ /** @description Range unsatisfiable. */
434
+ 416: {
435
+ headers: {
436
+ [name: string]: unknown;
437
+ };
438
+ content?: never;
439
+ };
440
+ /** @description Invalid request; visitor roles are viewer only. */
441
+ 422: {
442
+ headers: {
443
+ [name: string]: unknown;
444
+ };
445
+ content?: never;
446
+ };
447
+ /** @description Bounded admission exhausted; retry after one minute. */
448
+ 429: {
449
+ headers: {
450
+ [name: string]: unknown;
451
+ };
452
+ content?: never;
453
+ };
454
+ /** @description Service unavailable. */
455
+ 503: {
456
+ headers: {
457
+ [name: string]: unknown;
458
+ };
459
+ content?: never;
460
+ };
461
+ };
462
+ };
463
+ readVisitorItem: {
464
+ parameters: {
465
+ query?: {
466
+ itemId?: string;
467
+ };
468
+ header: {
469
+ /** @description DriveVisitor followed by a space and the capability. Never place tokens in URLs. */
470
+ Authorization: string;
471
+ };
472
+ path?: never;
473
+ cookie?: never;
474
+ };
475
+ requestBody?: never;
476
+ responses: {
477
+ /** @description Current descendant item. */
478
+ 200: {
479
+ headers: {
480
+ [name: string]: unknown;
481
+ };
482
+ content: {
483
+ "application/json": {
484
+ itemId: string;
485
+ /** @enum {string} */
486
+ kind: "file" | "folder";
487
+ name: string | null;
488
+ /** @enum {string} */
489
+ role: "viewer";
490
+ rootItemId: string;
491
+ };
492
+ };
493
+ };
494
+ /** @description Capability or resource unavailable. */
495
+ 404: {
496
+ headers: {
497
+ [name: string]: unknown;
498
+ };
499
+ content?: never;
500
+ };
501
+ /** @description Conflicting request identity. */
502
+ 409: {
503
+ headers: {
504
+ [name: string]: unknown;
505
+ };
506
+ content?: never;
507
+ };
508
+ /** @description Invalid request; visitor roles are viewer only. */
509
+ 422: {
510
+ headers: {
511
+ [name: string]: unknown;
512
+ };
513
+ content?: never;
514
+ };
515
+ /** @description Bounded admission exhausted; retry after one minute. */
516
+ 429: {
517
+ headers: {
518
+ [name: string]: unknown;
519
+ };
520
+ content?: never;
521
+ };
522
+ /** @description Service unavailable. */
523
+ 503: {
524
+ headers: {
525
+ [name: string]: unknown;
526
+ };
527
+ content?: never;
528
+ };
529
+ };
530
+ };
531
+ redeemVisitorInvitation: {
532
+ parameters: {
533
+ query?: never;
534
+ header: {
535
+ /** @description DriveVisitor followed by a space and the capability. Never place tokens in URLs. */
536
+ Authorization: string;
537
+ };
538
+ path?: never;
539
+ cookie?: never;
540
+ };
541
+ requestBody: {
542
+ content: {
543
+ "application/json": {
544
+ sessionToken: string;
545
+ };
546
+ };
547
+ };
548
+ responses: {
549
+ /** @description Session bound to the invitation's exact email and scope. */
550
+ 200: {
551
+ headers: {
552
+ [name: string]: unknown;
553
+ };
554
+ content: {
555
+ "application/json": {
556
+ expiresAt: number;
557
+ grantId: string;
558
+ /** @enum {string} */
559
+ role: "viewer";
560
+ };
561
+ };
562
+ };
563
+ /** @description Capability or resource unavailable. */
564
+ 404: {
565
+ headers: {
566
+ [name: string]: unknown;
567
+ };
568
+ content?: never;
569
+ };
570
+ /** @description Conflicting request identity. */
571
+ 409: {
572
+ headers: {
573
+ [name: string]: unknown;
574
+ };
575
+ content?: never;
576
+ };
577
+ /** @description Invalid request; visitor roles are viewer only. */
578
+ 422: {
579
+ headers: {
580
+ [name: string]: unknown;
581
+ };
582
+ content?: never;
583
+ };
584
+ /** @description Bounded admission exhausted; retry after one minute. */
585
+ 429: {
586
+ headers: {
587
+ [name: string]: unknown;
588
+ };
589
+ content?: never;
590
+ };
591
+ /** @description Service unavailable. */
592
+ 503: {
593
+ headers: {
594
+ [name: string]: unknown;
595
+ };
596
+ content?: never;
597
+ };
598
+ };
599
+ };
290
600
  getCurrentWorkspace: {
291
601
  parameters: {
292
602
  query?: never;
@@ -419,6 +729,138 @@ interface operations {
419
729
  };
420
730
  };
421
731
  };
732
+ ensureOrganizationWorkspaceAccess: {
733
+ parameters: {
734
+ query?: never;
735
+ header?: never;
736
+ path?: never;
737
+ cookie?: never;
738
+ };
739
+ requestBody?: never;
740
+ responses: {
741
+ /** @description Current workspace is accessible to the verified organization subject. */
742
+ 200: {
743
+ headers: {
744
+ [name: string]: unknown;
745
+ };
746
+ content: {
747
+ "application/json": {
748
+ rootItemId: string;
749
+ rootVolumeId: string;
750
+ workspaceId: string;
751
+ workspaceReference: {
752
+ /** @enum {string} */
753
+ type: "personal";
754
+ userId: string;
755
+ } | {
756
+ organizationId: string;
757
+ /** @enum {string} */
758
+ type: "organization";
759
+ };
760
+ };
761
+ };
762
+ };
763
+ /** @description A valid user credential is required. */
764
+ 401: {
765
+ headers: {
766
+ [name: string]: unknown;
767
+ };
768
+ content: {
769
+ "application/json": {
770
+ error: {
771
+ /** @enum {string} */
772
+ code: "authentication_required";
773
+ details: Record<string, never>;
774
+ /** @enum {string} */
775
+ message: "Authentication is required.";
776
+ requestId: string;
777
+ };
778
+ };
779
+ };
780
+ };
781
+ /** @description Organization context is required or storage is disabled. */
782
+ 403: {
783
+ headers: {
784
+ [name: string]: unknown;
785
+ };
786
+ content: {
787
+ "application/json": {
788
+ error: {
789
+ /** @enum {string} */
790
+ code: "permission_denied";
791
+ details: Record<string, never>;
792
+ /** @enum {string} */
793
+ message: "The requested action is not permitted.";
794
+ requestId: string;
795
+ };
796
+ };
797
+ };
798
+ };
799
+ /** @description The selected workspace is not provisioned. */
800
+ 404: {
801
+ headers: {
802
+ [name: string]: unknown;
803
+ };
804
+ content: {
805
+ "application/json": {
806
+ error: {
807
+ /** @enum {string} */
808
+ code: "resource_not_found";
809
+ details: Record<string, never>;
810
+ /** @enum {string} */
811
+ message: "The requested resource was not found.";
812
+ requestId: string;
813
+ };
814
+ };
815
+ };
816
+ };
817
+ /** @description Body and query input are not accepted. */
818
+ 422: {
819
+ headers: {
820
+ [name: string]: unknown;
821
+ };
822
+ content: {
823
+ "application/json": {
824
+ error: {
825
+ /** @enum {string} */
826
+ code: "invalid_request";
827
+ details: Record<string, never>;
828
+ /** @enum {string} */
829
+ message: "The request is invalid.";
830
+ requestId: string;
831
+ };
832
+ };
833
+ };
834
+ };
835
+ /** @description Authority or canonical storage state is unavailable. */
836
+ 503: {
837
+ headers: {
838
+ [name: string]: unknown;
839
+ };
840
+ content: {
841
+ "application/json": {
842
+ error: {
843
+ /** @enum {string} */
844
+ code: "identity_authority_unavailable";
845
+ details: Record<string, never>;
846
+ /** @enum {string} */
847
+ message: "Authentication is temporarily unavailable.";
848
+ requestId: string;
849
+ };
850
+ } | {
851
+ error: {
852
+ /** @enum {string} */
853
+ code: "service_unavailable";
854
+ details: Record<string, never>;
855
+ /** @enum {string} */
856
+ message: "The service is temporarily unavailable.";
857
+ requestId: string;
858
+ };
859
+ };
860
+ };
861
+ };
862
+ };
863
+ };
422
864
  getCurrentWorkspaceSources: {
423
865
  parameters: {
424
866
  query?: never;
@@ -570,6 +1012,8 @@ interface operations {
570
1012
  view?: "recent" | "shared" | "trash";
571
1013
  kind?: "file" | "folder";
572
1014
  creatorUserId?: string;
1015
+ /** @description Comma-separated exact lowercase media types (1–16 unique values). Matches published current file versions, not filename extensions. */
1016
+ mediaTypes?: string;
573
1017
  limit?: number;
574
1018
  cursor?: string;
575
1019
  };
@@ -1266,6 +1710,74 @@ interface operations {
1266
1710
  };
1267
1711
  };
1268
1712
  };
1713
+ getFileAccessContext: {
1714
+ parameters: {
1715
+ query?: never;
1716
+ header?: never;
1717
+ path: {
1718
+ workspaceId: string;
1719
+ itemId: string;
1720
+ };
1721
+ cookie?: never;
1722
+ };
1723
+ requestBody?: never;
1724
+ responses: {
1725
+ /** @description Current file version, generation and access snapshot; not a write credential. */
1726
+ 200: {
1727
+ headers: {
1728
+ [name: string]: unknown;
1729
+ };
1730
+ content: {
1731
+ "application/json": {
1732
+ canRead: boolean;
1733
+ canWrite: boolean;
1734
+ /** Format: uuid */
1735
+ contentGeneration: string | null;
1736
+ itemId: string;
1737
+ subject: string;
1738
+ validUntil: number;
1739
+ versionId: string;
1740
+ workspaceId: string;
1741
+ };
1742
+ };
1743
+ };
1744
+ /** @description User authentication required. */
1745
+ 401: {
1746
+ headers: {
1747
+ [name: string]: unknown;
1748
+ };
1749
+ content?: never;
1750
+ };
1751
+ /** @description File unavailable. */
1752
+ 404: {
1753
+ headers: {
1754
+ [name: string]: unknown;
1755
+ };
1756
+ content?: never;
1757
+ };
1758
+ /** @description Authority changed. */
1759
+ 409: {
1760
+ headers: {
1761
+ [name: string]: unknown;
1762
+ };
1763
+ content?: never;
1764
+ };
1765
+ /** @description Invalid request. */
1766
+ 422: {
1767
+ headers: {
1768
+ [name: string]: unknown;
1769
+ };
1770
+ content?: never;
1771
+ };
1772
+ /** @description Authority unavailable. */
1773
+ 503: {
1774
+ headers: {
1775
+ [name: string]: unknown;
1776
+ };
1777
+ content?: never;
1778
+ };
1779
+ };
1780
+ };
1269
1781
  listFolderChildren: {
1270
1782
  parameters: {
1271
1783
  query?: {
@@ -3655,6 +4167,113 @@ interface operations {
3655
4167
  };
3656
4168
  };
3657
4169
  };
4170
+ createFileVersionUpload: {
4171
+ parameters: {
4172
+ query?: never;
4173
+ header: {
4174
+ "Idempotency-Key": string;
4175
+ "If-Match": string;
4176
+ };
4177
+ path: {
4178
+ workspaceId: string;
4179
+ itemId: string;
4180
+ };
4181
+ cookie?: never;
4182
+ };
4183
+ requestBody: {
4184
+ content: {
4185
+ "application/json": {
4186
+ byteLength: number;
4187
+ digest: string;
4188
+ expectedVersionId: string;
4189
+ };
4190
+ };
4191
+ };
4192
+ responses: {
4193
+ /** @description Exact replay of the admitted checkpoint upload. */
4194
+ 200: {
4195
+ headers: {
4196
+ [name: string]: unknown;
4197
+ };
4198
+ content: {
4199
+ "application/json": {
4200
+ expiresAtEpochMilliseconds: number;
4201
+ itemId: string;
4202
+ /** @enum {string} */
4203
+ mode: "presigned-multipart" | "server-mediated-zero-byte";
4204
+ /** @enum {number} */
4205
+ partByteLength: 33554432;
4206
+ partCount: number;
4207
+ revision: number;
4208
+ uploadId: string;
4209
+ versionId: string;
4210
+ };
4211
+ };
4212
+ };
4213
+ /** @description New checkpoint upload using ordinary archive multipart operations. */
4214
+ 201: {
4215
+ headers: {
4216
+ [name: string]: unknown;
4217
+ };
4218
+ content: {
4219
+ "application/json": {
4220
+ expiresAtEpochMilliseconds: number;
4221
+ itemId: string;
4222
+ /** @enum {string} */
4223
+ mode: "presigned-multipart" | "server-mediated-zero-byte";
4224
+ /** @enum {number} */
4225
+ partByteLength: 33554432;
4226
+ partCount: number;
4227
+ revision: number;
4228
+ uploadId: string;
4229
+ versionId: string;
4230
+ };
4231
+ };
4232
+ };
4233
+ /** @description Drive user authentication required. */
4234
+ 401: {
4235
+ headers: {
4236
+ [name: string]: unknown;
4237
+ };
4238
+ content?: never;
4239
+ };
4240
+ /** @description Current file update permission required. */
4241
+ 403: {
4242
+ headers: {
4243
+ [name: string]: unknown;
4244
+ };
4245
+ content?: never;
4246
+ };
4247
+ /** @description File or upload unavailable. */
4248
+ 404: {
4249
+ headers: {
4250
+ [name: string]: unknown;
4251
+ };
4252
+ content?: never;
4253
+ };
4254
+ /** @description Expected version, quota or idempotency conflict. */
4255
+ 409: {
4256
+ headers: {
4257
+ [name: string]: unknown;
4258
+ };
4259
+ content?: never;
4260
+ };
4261
+ /** @description Invalid conditional version request. */
4262
+ 422: {
4263
+ headers: {
4264
+ [name: string]: unknown;
4265
+ };
4266
+ content?: never;
4267
+ };
4268
+ /** @description Archive or persistence unavailable; retain operation identity for retry. */
4269
+ 503: {
4270
+ headers: {
4271
+ [name: string]: unknown;
4272
+ };
4273
+ content?: never;
4274
+ };
4275
+ };
4276
+ };
3658
4277
  listItemVersions: {
3659
4278
  parameters: {
3660
4279
  query?: {
@@ -3877,7 +4496,156 @@ interface operations {
3877
4496
  };
3878
4497
  };
3879
4498
  };
3880
- /** @description Managed storage is disabled for the discoverable file. */
4499
+ /** @description Managed storage is disabled for the discoverable file. */
4500
+ 403: {
4501
+ headers: {
4502
+ [name: string]: unknown;
4503
+ };
4504
+ content: {
4505
+ "application/json": {
4506
+ error: {
4507
+ /** @enum {string} */
4508
+ code: "permission_denied";
4509
+ details: Record<string, never>;
4510
+ /** @enum {string} */
4511
+ message: "The requested action is not permitted.";
4512
+ requestId: string;
4513
+ };
4514
+ };
4515
+ };
4516
+ };
4517
+ /** @description The file or version is absent, undiscoverable, unpublished, or deleting. */
4518
+ 404: {
4519
+ headers: {
4520
+ [name: string]: unknown;
4521
+ };
4522
+ content: {
4523
+ "application/json": {
4524
+ error: {
4525
+ /** @enum {string} */
4526
+ code: "resource_not_found";
4527
+ details: Record<string, never>;
4528
+ /** @enum {string} */
4529
+ message: "The requested resource was not found.";
4530
+ requestId: string;
4531
+ };
4532
+ };
4533
+ };
4534
+ };
4535
+ /** @description Authorization or version metadata changed after preflight. */
4536
+ 409: {
4537
+ headers: {
4538
+ [name: string]: unknown;
4539
+ };
4540
+ content: {
4541
+ "application/json": {
4542
+ error: {
4543
+ /** @enum {string} */
4544
+ code: "precondition_failed";
4545
+ details: Record<string, never>;
4546
+ /** @enum {string} */
4547
+ message: "The request precondition failed.";
4548
+ requestId: string;
4549
+ };
4550
+ };
4551
+ };
4552
+ };
4553
+ /** @description The path, query, or unexpected body is invalid. */
4554
+ 422: {
4555
+ headers: {
4556
+ [name: string]: unknown;
4557
+ };
4558
+ content: {
4559
+ "application/json": {
4560
+ error: {
4561
+ /** @enum {string} */
4562
+ code: "invalid_request";
4563
+ details: Record<string, never>;
4564
+ /** @enum {string} */
4565
+ message: "The request is invalid.";
4566
+ requestId: string;
4567
+ };
4568
+ };
4569
+ };
4570
+ };
4571
+ /** @description Identity, D1, authorization, capacity, or managed authority is unavailable. */
4572
+ 503: {
4573
+ headers: {
4574
+ [name: string]: unknown;
4575
+ };
4576
+ content: {
4577
+ "application/json": {
4578
+ error: {
4579
+ /** @enum {string} */
4580
+ code: "identity_authority_unavailable";
4581
+ details: Record<string, never>;
4582
+ /** @enum {string} */
4583
+ message: "Authentication is temporarily unavailable.";
4584
+ requestId: string;
4585
+ };
4586
+ } | {
4587
+ error: {
4588
+ /** @enum {string} */
4589
+ code: "service_unavailable";
4590
+ details: Record<string, never>;
4591
+ /** @enum {string} */
4592
+ message: "The service is temporarily unavailable.";
4593
+ requestId: string;
4594
+ };
4595
+ };
4596
+ };
4597
+ };
4598
+ };
4599
+ };
4600
+ restoreItemVersion: {
4601
+ parameters: {
4602
+ query?: never;
4603
+ header: {
4604
+ "Idempotency-Key": string;
4605
+ "If-Match": string;
4606
+ };
4607
+ path: {
4608
+ workspaceId: string;
4609
+ itemId: string;
4610
+ versionId: string;
4611
+ };
4612
+ cookie?: never;
4613
+ };
4614
+ requestBody?: never;
4615
+ responses: {
4616
+ /** @description The selected version is current or the exact result was replayed. */
4617
+ 200: {
4618
+ headers: {
4619
+ /** @description Strong precondition for the next item mutation. */
4620
+ ETag?: string;
4621
+ [name: string]: unknown;
4622
+ };
4623
+ content: {
4624
+ "application/json": {
4625
+ currentVersionId: string;
4626
+ itemRevision: number;
4627
+ };
4628
+ };
4629
+ };
4630
+ /** @description A valid Drive user bearer credential is required. */
4631
+ 401: {
4632
+ headers: {
4633
+ [name: string]: unknown;
4634
+ };
4635
+ content: {
4636
+ "application/json": {
4637
+ error: {
4638
+ /** @enum {string} */
4639
+ code: "authentication_required";
4640
+ details: Record<string, never>;
4641
+ /** @enum {string} */
4642
+ message: "Authentication is required.";
4643
+ requestId: string;
4644
+ };
4645
+ };
4646
+ };
4647
+ };
4648
+ /** @description The discoverable item does not permit this lifecycle action. */
3881
4649
  403: {
3882
4650
  headers: {
3883
4651
  [name: string]: unknown;
@@ -3895,7 +4663,7 @@ interface operations {
3895
4663
  };
3896
4664
  };
3897
4665
  };
3898
- /** @description The file or version is absent, undiscoverable, unpublished, or deleting. */
4666
+ /** @description The item or destination is absent or undiscoverable. */
3899
4667
  404: {
3900
4668
  headers: {
3901
4669
  [name: string]: unknown;
@@ -3913,13 +4681,22 @@ interface operations {
3913
4681
  };
3914
4682
  };
3915
4683
  };
3916
- /** @description Authorization or version metadata changed after preflight. */
4684
+ /** @description The key conflicts, the precondition is stale, or lifecycle authority changed. */
3917
4685
  409: {
3918
4686
  headers: {
3919
4687
  [name: string]: unknown;
3920
4688
  };
3921
4689
  content: {
3922
4690
  "application/json": {
4691
+ error: {
4692
+ /** @enum {string} */
4693
+ code: "idempotency_conflict";
4694
+ details: Record<string, never>;
4695
+ /** @enum {string} */
4696
+ message: "The idempotency key conflicts with an earlier request.";
4697
+ requestId: string;
4698
+ };
4699
+ } | {
3923
4700
  error: {
3924
4701
  /** @enum {string} */
3925
4702
  code: "precondition_failed";
@@ -3931,7 +4708,7 @@ interface operations {
3931
4708
  };
3932
4709
  };
3933
4710
  };
3934
- /** @description The path, query, or unexpected body is invalid. */
4711
+ /** @description The path, query, headers, key, or strict body is invalid. */
3935
4712
  422: {
3936
4713
  headers: {
3937
4714
  [name: string]: unknown;
@@ -3946,10 +4723,19 @@ interface operations {
3946
4723
  message: "The request is invalid.";
3947
4724
  requestId: string;
3948
4725
  };
4726
+ } | {
4727
+ error: {
4728
+ /** @enum {string} */
4729
+ code: "invalid_idempotency_key";
4730
+ details: Record<string, never>;
4731
+ /** @enum {string} */
4732
+ message: "The idempotency key is invalid.";
4733
+ requestId: string;
4734
+ };
3949
4735
  };
3950
4736
  };
3951
4737
  };
3952
- /** @description Identity, D1, authorization, capacity, or managed authority is unavailable. */
4738
+ /** @description Identity, D1, authorization, capacity, or archive authority is unavailable. */
3953
4739
  503: {
3954
4740
  headers: {
3955
4741
  [name: string]: unknown;
@@ -3978,170 +4764,375 @@ interface operations {
3978
4764
  };
3979
4765
  };
3980
4766
  };
3981
- restoreItemVersion: {
4767
+ listVisitorGrants: {
4768
+ parameters: {
4769
+ query?: never;
4770
+ header?: never;
4771
+ path: {
4772
+ workspaceId: string;
4773
+ itemId: string;
4774
+ };
4775
+ cookie?: never;
4776
+ };
4777
+ requestBody?: never;
4778
+ responses: {
4779
+ /** @description Bounded visitor grant list without tokens. */
4780
+ 200: {
4781
+ headers: {
4782
+ [name: string]: unknown;
4783
+ };
4784
+ content: {
4785
+ "application/json": {
4786
+ items: {
4787
+ createdAt: number;
4788
+ email: string | null;
4789
+ expiresAt: number;
4790
+ /** Format: uuid */
4791
+ grantId: string;
4792
+ /** @enum {string} */
4793
+ mode: "anyone" | "email";
4794
+ /** @enum {string} */
4795
+ role: "viewer";
4796
+ /** @enum {string} */
4797
+ source: "direct" | "inherited";
4798
+ sourceItemId: string;
4799
+ /** @enum {string} */
4800
+ status: "pending" | "active" | "expired" | "revoked";
4801
+ }[];
4802
+ };
4803
+ };
4804
+ };
4805
+ /** @description Drive user bearer required. */
4806
+ 401: {
4807
+ headers: {
4808
+ [name: string]: unknown;
4809
+ };
4810
+ content?: never;
4811
+ };
4812
+ /** @description Current item manager authority required. */
4813
+ 403: {
4814
+ headers: {
4815
+ [name: string]: unknown;
4816
+ };
4817
+ content?: never;
4818
+ };
4819
+ /** @description Capability or resource unavailable. */
4820
+ 404: {
4821
+ headers: {
4822
+ [name: string]: unknown;
4823
+ };
4824
+ content?: never;
4825
+ };
4826
+ /** @description Conflicting request identity. */
4827
+ 409: {
4828
+ headers: {
4829
+ [name: string]: unknown;
4830
+ };
4831
+ content?: never;
4832
+ };
4833
+ /** @description Invalid request; visitor roles are viewer only. */
4834
+ 422: {
4835
+ headers: {
4836
+ [name: string]: unknown;
4837
+ };
4838
+ content?: never;
4839
+ };
4840
+ /** @description Bounded admission exhausted; retry after one minute. */
4841
+ 429: {
4842
+ headers: {
4843
+ [name: string]: unknown;
4844
+ };
4845
+ content?: never;
4846
+ };
4847
+ /** @description Service unavailable. */
4848
+ 503: {
4849
+ headers: {
4850
+ [name: string]: unknown;
4851
+ };
4852
+ content?: never;
4853
+ };
4854
+ };
4855
+ };
4856
+ createVisitorGrant: {
4857
+ parameters: {
4858
+ query?: never;
4859
+ header: {
4860
+ "Idempotency-Key": string;
4861
+ };
4862
+ path: {
4863
+ workspaceId: string;
4864
+ itemId: string;
4865
+ };
4866
+ cookie?: never;
4867
+ };
4868
+ requestBody: {
4869
+ content: {
4870
+ "application/json": {
4871
+ expiresAt: number;
4872
+ /** @constant */
4873
+ mode: "anyone";
4874
+ /** @constant */
4875
+ role: "viewer";
4876
+ } | {
4877
+ email: string;
4878
+ expiresAt: number;
4879
+ /** @constant */
4880
+ mode: "email";
4881
+ /** @constant */
4882
+ role: "viewer";
4883
+ };
4884
+ };
4885
+ };
4886
+ responses: {
4887
+ /** @description Idempotent grant and confidential dispatch token; email does not enable public access. */
4888
+ 200: {
4889
+ headers: {
4890
+ [name: string]: unknown;
4891
+ };
4892
+ content: {
4893
+ "application/json": {
4894
+ grant: {
4895
+ createdAt: number;
4896
+ email: string | null;
4897
+ expiresAt: number;
4898
+ /** Format: uuid */
4899
+ grantId: string;
4900
+ /** @enum {string} */
4901
+ mode: "anyone" | "email";
4902
+ /** @enum {string} */
4903
+ role: "viewer";
4904
+ /** @enum {string} */
4905
+ status: "pending" | "active" | "expired" | "revoked";
4906
+ };
4907
+ token: string | null;
4908
+ /** @enum {string} */
4909
+ tokenPurpose: "view" | "verify-email";
4910
+ };
4911
+ };
4912
+ };
4913
+ /** @description Drive user bearer required. */
4914
+ 401: {
4915
+ headers: {
4916
+ [name: string]: unknown;
4917
+ };
4918
+ content?: never;
4919
+ };
4920
+ /** @description Current item manager authority required. */
4921
+ 403: {
4922
+ headers: {
4923
+ [name: string]: unknown;
4924
+ };
4925
+ content?: never;
4926
+ };
4927
+ /** @description Capability or resource unavailable. */
4928
+ 404: {
4929
+ headers: {
4930
+ [name: string]: unknown;
4931
+ };
4932
+ content?: never;
4933
+ };
4934
+ /** @description Conflicting request identity. */
4935
+ 409: {
4936
+ headers: {
4937
+ [name: string]: unknown;
4938
+ };
4939
+ content?: never;
4940
+ };
4941
+ /** @description Invalid request; visitor roles are viewer only. */
4942
+ 422: {
4943
+ headers: {
4944
+ [name: string]: unknown;
4945
+ };
4946
+ content?: never;
4947
+ };
4948
+ /** @description Bounded admission exhausted; retry after one minute. */
4949
+ 429: {
4950
+ headers: {
4951
+ [name: string]: unknown;
4952
+ };
4953
+ content?: never;
4954
+ };
4955
+ /** @description Service unavailable. */
4956
+ 503: {
4957
+ headers: {
4958
+ [name: string]: unknown;
4959
+ };
4960
+ content?: never;
4961
+ };
4962
+ };
4963
+ };
4964
+ getVisitorGrant: {
4965
+ parameters: {
4966
+ query?: never;
4967
+ header?: never;
4968
+ path: {
4969
+ workspaceId: string;
4970
+ itemId: string;
4971
+ grantId: string;
4972
+ };
4973
+ cookie?: never;
4974
+ };
4975
+ requestBody?: never;
4976
+ responses: {
4977
+ /** @description Confidential existing link for copy or pending-email redispatch; inactive tokens are null. */
4978
+ 200: {
4979
+ headers: {
4980
+ [name: string]: unknown;
4981
+ };
4982
+ content: {
4983
+ "application/json": {
4984
+ grant: {
4985
+ createdAt: number;
4986
+ email: string | null;
4987
+ expiresAt: number;
4988
+ /** Format: uuid */
4989
+ grantId: string;
4990
+ /** @enum {string} */
4991
+ mode: "anyone" | "email";
4992
+ /** @enum {string} */
4993
+ role: "viewer";
4994
+ /** @enum {string} */
4995
+ status: "pending" | "active" | "expired" | "revoked";
4996
+ };
4997
+ token: string | null;
4998
+ /** @enum {string} */
4999
+ tokenPurpose: "view" | "verify-email";
5000
+ };
5001
+ };
5002
+ };
5003
+ /** @description Drive user bearer required. */
5004
+ 401: {
5005
+ headers: {
5006
+ [name: string]: unknown;
5007
+ };
5008
+ content?: never;
5009
+ };
5010
+ /** @description Current item manager authority required. */
5011
+ 403: {
5012
+ headers: {
5013
+ [name: string]: unknown;
5014
+ };
5015
+ content?: never;
5016
+ };
5017
+ /** @description Capability or resource unavailable. */
5018
+ 404: {
5019
+ headers: {
5020
+ [name: string]: unknown;
5021
+ };
5022
+ content?: never;
5023
+ };
5024
+ /** @description Conflicting request identity. */
5025
+ 409: {
5026
+ headers: {
5027
+ [name: string]: unknown;
5028
+ };
5029
+ content?: never;
5030
+ };
5031
+ /** @description Invalid request; visitor roles are viewer only. */
5032
+ 422: {
5033
+ headers: {
5034
+ [name: string]: unknown;
5035
+ };
5036
+ content?: never;
5037
+ };
5038
+ /** @description Bounded admission exhausted; retry after one minute. */
5039
+ 429: {
5040
+ headers: {
5041
+ [name: string]: unknown;
5042
+ };
5043
+ content?: never;
5044
+ };
5045
+ /** @description Service unavailable. */
5046
+ 503: {
5047
+ headers: {
5048
+ [name: string]: unknown;
5049
+ };
5050
+ content?: never;
5051
+ };
5052
+ };
5053
+ };
5054
+ revokeVisitorGrant: {
3982
5055
  parameters: {
3983
5056
  query?: never;
3984
- header: {
3985
- "Idempotency-Key": string;
3986
- "If-Match": string;
3987
- };
5057
+ header?: never;
3988
5058
  path: {
3989
5059
  workspaceId: string;
3990
5060
  itemId: string;
3991
- versionId: string;
5061
+ grantId: string;
3992
5062
  };
3993
5063
  cookie?: never;
3994
5064
  };
3995
5065
  requestBody?: never;
3996
5066
  responses: {
3997
- /** @description The selected version is current or the exact result was replayed. */
5067
+ /** @description Revoked grant. */
3998
5068
  200: {
3999
5069
  headers: {
4000
- /** @description Strong precondition for the next item mutation. */
4001
- ETag?: string;
4002
5070
  [name: string]: unknown;
4003
5071
  };
4004
5072
  content: {
4005
5073
  "application/json": {
4006
- currentVersionId: string;
4007
- itemRevision: number;
5074
+ createdAt: number;
5075
+ email: string | null;
5076
+ expiresAt: number;
5077
+ /** Format: uuid */
5078
+ grantId: string;
5079
+ /** @enum {string} */
5080
+ mode: "anyone" | "email";
5081
+ /** @enum {string} */
5082
+ role: "viewer";
5083
+ /** @enum {string} */
5084
+ status: "pending" | "active" | "expired" | "revoked";
4008
5085
  };
4009
5086
  };
4010
5087
  };
4011
- /** @description A valid Drive user bearer credential is required. */
5088
+ /** @description Drive user bearer required. */
4012
5089
  401: {
4013
5090
  headers: {
4014
5091
  [name: string]: unknown;
4015
5092
  };
4016
- content: {
4017
- "application/json": {
4018
- error: {
4019
- /** @enum {string} */
4020
- code: "authentication_required";
4021
- details: Record<string, never>;
4022
- /** @enum {string} */
4023
- message: "Authentication is required.";
4024
- requestId: string;
4025
- };
4026
- };
4027
- };
5093
+ content?: never;
4028
5094
  };
4029
- /** @description The discoverable item does not permit this lifecycle action. */
5095
+ /** @description Current item manager authority required. */
4030
5096
  403: {
4031
5097
  headers: {
4032
5098
  [name: string]: unknown;
4033
5099
  };
4034
- content: {
4035
- "application/json": {
4036
- error: {
4037
- /** @enum {string} */
4038
- code: "permission_denied";
4039
- details: Record<string, never>;
4040
- /** @enum {string} */
4041
- message: "The requested action is not permitted.";
4042
- requestId: string;
4043
- };
4044
- };
4045
- };
5100
+ content?: never;
4046
5101
  };
4047
- /** @description The item or destination is absent or undiscoverable. */
5102
+ /** @description Capability or resource unavailable. */
4048
5103
  404: {
4049
5104
  headers: {
4050
5105
  [name: string]: unknown;
4051
5106
  };
4052
- content: {
4053
- "application/json": {
4054
- error: {
4055
- /** @enum {string} */
4056
- code: "resource_not_found";
4057
- details: Record<string, never>;
4058
- /** @enum {string} */
4059
- message: "The requested resource was not found.";
4060
- requestId: string;
4061
- };
4062
- };
4063
- };
5107
+ content?: never;
4064
5108
  };
4065
- /** @description The key conflicts, the precondition is stale, or lifecycle authority changed. */
5109
+ /** @description Conflicting request identity. */
4066
5110
  409: {
4067
5111
  headers: {
4068
5112
  [name: string]: unknown;
4069
5113
  };
4070
- content: {
4071
- "application/json": {
4072
- error: {
4073
- /** @enum {string} */
4074
- code: "idempotency_conflict";
4075
- details: Record<string, never>;
4076
- /** @enum {string} */
4077
- message: "The idempotency key conflicts with an earlier request.";
4078
- requestId: string;
4079
- };
4080
- } | {
4081
- error: {
4082
- /** @enum {string} */
4083
- code: "precondition_failed";
4084
- details: Record<string, never>;
4085
- /** @enum {string} */
4086
- message: "The request precondition failed.";
4087
- requestId: string;
4088
- };
4089
- };
4090
- };
5114
+ content?: never;
4091
5115
  };
4092
- /** @description The path, query, headers, key, or strict body is invalid. */
5116
+ /** @description Invalid request; visitor roles are viewer only. */
4093
5117
  422: {
4094
5118
  headers: {
4095
5119
  [name: string]: unknown;
4096
5120
  };
4097
- content: {
4098
- "application/json": {
4099
- error: {
4100
- /** @enum {string} */
4101
- code: "invalid_request";
4102
- details: Record<string, never>;
4103
- /** @enum {string} */
4104
- message: "The request is invalid.";
4105
- requestId: string;
4106
- };
4107
- } | {
4108
- error: {
4109
- /** @enum {string} */
4110
- code: "invalid_idempotency_key";
4111
- details: Record<string, never>;
4112
- /** @enum {string} */
4113
- message: "The idempotency key is invalid.";
4114
- requestId: string;
4115
- };
4116
- };
5121
+ content?: never;
5122
+ };
5123
+ /** @description Bounded admission exhausted; retry after one minute. */
5124
+ 429: {
5125
+ headers: {
5126
+ [name: string]: unknown;
4117
5127
  };
5128
+ content?: never;
4118
5129
  };
4119
- /** @description Identity, D1, authorization, capacity, or archive authority is unavailable. */
5130
+ /** @description Service unavailable. */
4120
5131
  503: {
4121
5132
  headers: {
4122
5133
  [name: string]: unknown;
4123
5134
  };
4124
- content: {
4125
- "application/json": {
4126
- error: {
4127
- /** @enum {string} */
4128
- code: "identity_authority_unavailable";
4129
- details: Record<string, never>;
4130
- /** @enum {string} */
4131
- message: "Authentication is temporarily unavailable.";
4132
- requestId: string;
4133
- };
4134
- } | {
4135
- error: {
4136
- /** @enum {string} */
4137
- code: "service_unavailable";
4138
- details: Record<string, never>;
4139
- /** @enum {string} */
4140
- message: "The service is temporarily unavailable.";
4141
- requestId: string;
4142
- };
4143
- };
4144
- };
5135
+ content?: never;
4145
5136
  };
4146
5137
  };
4147
5138
  };
@@ -5376,6 +6367,109 @@ interface operations {
5376
6367
  };
5377
6368
  };
5378
6369
  };
6370
+ commitFileVersion: {
6371
+ parameters: {
6372
+ query?: never;
6373
+ header: {
6374
+ "Idempotency-Key": string;
6375
+ "If-Match": string;
6376
+ };
6377
+ path: {
6378
+ workspaceId: string;
6379
+ uploadId: string;
6380
+ };
6381
+ cookie?: never;
6382
+ };
6383
+ requestBody: {
6384
+ content: {
6385
+ "application/json": {
6386
+ expectedVersionId: string;
6387
+ };
6388
+ };
6389
+ };
6390
+ responses: {
6391
+ /** @description Archive verified and exact-version checkpoint committed or replayed. */
6392
+ 200: {
6393
+ headers: {
6394
+ [name: string]: unknown;
6395
+ };
6396
+ content: {
6397
+ "application/json": {
6398
+ byteLength: number;
6399
+ /** @description Caller-declared whole-file SHA-256. Portable profiles independently verify file bytes before publication; legacy profiles retain provider-checksum semantics. */
6400
+ callerDeclaredContentDigest: string;
6401
+ displayFilename: string;
6402
+ itemId: string;
6403
+ mediaType: string;
6404
+ /** @enum {string} */
6405
+ state: "ready";
6406
+ uploadId: string;
6407
+ versionId: string;
6408
+ };
6409
+ };
6410
+ };
6411
+ /** @description Archive hash verification still pending; retain the same operation identity. */
6412
+ 202: {
6413
+ headers: {
6414
+ [name: string]: unknown;
6415
+ };
6416
+ content: {
6417
+ "application/json": {
6418
+ itemId: string;
6419
+ /** @enum {string} */
6420
+ state: "verifying";
6421
+ totalByteLength: number;
6422
+ uploadId: string;
6423
+ verificationRevision: number;
6424
+ verifiedByteLength: number;
6425
+ versionId: string;
6426
+ };
6427
+ };
6428
+ };
6429
+ /** @description Drive user authentication required. */
6430
+ 401: {
6431
+ headers: {
6432
+ [name: string]: unknown;
6433
+ };
6434
+ content?: never;
6435
+ };
6436
+ /** @description Current file update permission required. */
6437
+ 403: {
6438
+ headers: {
6439
+ [name: string]: unknown;
6440
+ };
6441
+ content?: never;
6442
+ };
6443
+ /** @description File or upload unavailable. */
6444
+ 404: {
6445
+ headers: {
6446
+ [name: string]: unknown;
6447
+ };
6448
+ content?: never;
6449
+ };
6450
+ /** @description Expected version, quota or idempotency conflict. */
6451
+ 409: {
6452
+ headers: {
6453
+ [name: string]: unknown;
6454
+ };
6455
+ content?: never;
6456
+ };
6457
+ /** @description Invalid conditional version request. */
6458
+ 422: {
6459
+ headers: {
6460
+ [name: string]: unknown;
6461
+ };
6462
+ content?: never;
6463
+ };
6464
+ /** @description Archive or persistence unavailable; retain operation identity for retry. */
6465
+ 503: {
6466
+ headers: {
6467
+ [name: string]: unknown;
6468
+ };
6469
+ content?: never;
6470
+ };
6471
+ };
6472
+ };
5379
6473
  getWorkspaceUsage: {
5380
6474
  parameters: {
5381
6475
  query?: never;
@@ -5529,6 +6623,20 @@ type JsonRequest<Name extends keyof operations> = operations[Name] extends {
5529
6623
  };
5530
6624
  };
5531
6625
  } ? Body : never;
6626
+ type CreateFileVersionUploadInput = Readonly<JsonRequest<"createFileVersionUpload"> & {
6627
+ workspaceId: string;
6628
+ itemId: string;
6629
+ idempotencyKey: string;
6630
+ signal?: AbortSignal;
6631
+ }>;
6632
+ type FileAccessContext = Readonly<JsonResponse<"getFileAccessContext", 200>>;
6633
+ type CommitFileVersionInput = Readonly<JsonRequest<"commitFileVersion"> & {
6634
+ workspaceId: string;
6635
+ itemId: string;
6636
+ uploadId: string;
6637
+ idempotencyKey: string;
6638
+ signal?: AbortSignal;
6639
+ }>;
5532
6640
  type ResourcePath = operations["listFolderChildren"]["parameters"]["path"];
5533
6641
  type PageQuery = NonNullable<operations["listFolderChildren"]["parameters"]["query"]>;
5534
6642
  type SearchWorkspaceItemsPath = operations["searchWorkspaceItems"]["parameters"]["path"];
@@ -5608,6 +6716,7 @@ interface GetWorkspaceUsageInput {
5608
6716
  readonly signal?: AbortSignal;
5609
6717
  }
5610
6718
  interface ListWorkspaceItemsInput extends GetWorkspaceUsageInput {
6719
+ readonly mediaTypes?: readonly string[];
5611
6720
  readonly view?: "recent" | "shared" | "trash";
5612
6721
  readonly kind?: "file" | "folder";
5613
6722
  readonly creatorUserId?: string;
@@ -5823,10 +6932,27 @@ interface UploadFileInput {
5823
6932
  readonly signal?: AbortSignal;
5824
6933
  readonly onProgress?: UploadFileProgressCallback;
5825
6934
  }
6935
+ interface UploadFileVersionInput {
6936
+ readonly workspaceId: string;
6937
+ readonly itemId: string;
6938
+ readonly expectedVersionId: string;
6939
+ readonly source: Blob;
6940
+ readonly idempotencyKey: string;
6941
+ readonly completionIdempotencyKey: string;
6942
+ readonly signal?: AbortSignal;
6943
+ readonly onProgress?: UploadFileProgressCallback;
6944
+ }
5826
6945
  interface GetCurrentWorkspaceInput {
5827
6946
  readonly signal?: AbortSignal;
5828
6947
  }
5829
6948
  interface DriveOperations {
6949
+ getFileAccessContext(input: GetItemInput): Promise<DriveOperationResult<FileAccessContext, 200>>;
6950
+ createFileVersionUpload(input: CreateFileVersionUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
6951
+ commitFileVersion(input: CommitFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
6952
+ createVisitorGrant(input: CreateVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
6953
+ getVisitorGrant(input: GetVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
6954
+ listVisitorGrants(input: GetItemInput): Promise<DriveOperationResult<VisitorGrantPage, 200>>;
6955
+ revokeVisitorGrant(input: RevokeVisitorGrantInput): Promise<DriveOperationResult<VisitorGrant, 200>>;
5830
6956
  registerItemRecipient(input: RegisterItemRecipientInput): Promise<DriveOperationResult<PermissionMutation, 200 | 201>>;
5831
6957
  listItemSharingPeople(input: ListItemSharingPeopleInput): Promise<DriveOperationResult<ItemSharingPeoplePage, 200>>;
5832
6958
  listIncomingShares(input?: ListIncomingSharesInput): Promise<DriveOperationResult<IncomingSharePage, 200>>;
@@ -5834,6 +6960,7 @@ interface DriveOperations {
5834
6960
  getWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<WorkspaceUsage, 200>>;
5835
6961
  getCurrentWorkspaceSources(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspaceSources, 200>>;
5836
6962
  getCurrentWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
6963
+ ensureOrganizationWorkspaceAccess(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
5837
6964
  getItem(input: GetItemInput): Promise<DriveOperationResult<ManagedItemMetadata, 200>>;
5838
6965
  searchWorkspaceItems(input: SearchWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceItemSearchPage, 200>>;
5839
6966
  listFolderChildren(input: ListFolderChildrenInput): Promise<DriveOperationResult<FolderPage, 200>>;
@@ -5859,9 +6986,53 @@ interface DriveOperations {
5859
6986
  completeUpload(input: CompleteUploadInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
5860
6987
  abortUpload(input: AbortUploadInput): Promise<DriveOperationResult<undefined, 204>>;
5861
6988
  }
6989
+ type VisitorGrantCreation = JsonResponse<"createVisitorGrant", 200>;
6990
+ type VisitorGrant = VisitorGrantCreation["grant"];
6991
+ type VisitorGrantPage = JsonResponse<"listVisitorGrants", 200>;
6992
+ type VisitorItem = JsonResponse<"readVisitorItem", 200>;
6993
+ type VisitorChildren = JsonResponse<"listVisitorChildren", 200>;
6994
+ type VisitorSession = JsonResponse<"redeemVisitorInvitation", 200>;
6995
+ type CreateVisitorGrantInput = GetItemInput & {
6996
+ readonly command: JsonRequest<"createVisitorGrant">;
6997
+ readonly idempotencyKey: string;
6998
+ };
6999
+ type RevokeVisitorGrantInput = GetItemInput & {
7000
+ readonly grantId: string;
7001
+ };
7002
+ type GetVisitorGrantInput = GetItemInput & {
7003
+ readonly grantId: string;
7004
+ };
7005
+ interface VisitorReadInput {
7006
+ readonly itemId?: string;
7007
+ readonly signal?: AbortSignal;
7008
+ }
7009
+ interface VisitorChildrenInput extends VisitorReadInput {
7010
+ readonly after?: string;
7011
+ }
7012
+ interface VisitorDownloadInput extends VisitorReadInput {
7013
+ readonly method?: "GET" | "HEAD";
7014
+ readonly range?: string;
7015
+ }
7016
+ interface DriveVisitorClientConfig {
7017
+ readonly baseUrl: string;
7018
+ readonly token: string;
7019
+ readonly fetch?: typeof globalThis.fetch;
7020
+ readonly timeoutMilliseconds?: number;
7021
+ }
7022
+ interface DriveVisitorClient {
7023
+ readItem(input?: VisitorReadInput): Promise<DriveOperationResult<VisitorItem, 200>>;
7024
+ listChildren(input?: VisitorChildrenInput): Promise<DriveOperationResult<VisitorChildren, 200>>;
7025
+ createDownload(input?: VisitorDownloadInput): Promise<DriveOperationResult<ManagedDownloadDescriptor, 200>>;
7026
+ downloadItem(input?: VisitorDownloadInput): Promise<Response>;
7027
+ redeemInvitation(input: {
7028
+ readonly sessionToken: string;
7029
+ readonly signal?: AbortSignal;
7030
+ }): Promise<DriveOperationResult<VisitorSession, 200>>;
7031
+ }
5862
7032
  interface DriveServerClient extends DriveOperations {}
5863
7033
  interface DriveClient extends DriveOperations {
7034
+ uploadFileVersion(input: UploadFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
5864
7035
  uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
5865
7036
  }
5866
7037
  //#endregion
5867
- export { ProtectionClassification as $, IncomingShareContext as A, ManagedDownloadRestorePending as B, FolderItem as C, WorkspaceDiscoveryPage as Ct, GetItemVersionInput as D, operations as Dt, GetItemInput as E, WorkspaceUsage as Et, ListItemPermissionsInput as F, ManagedItemVersionRestoreResult as G, ManagedItemVersion as H, ListItemSharingPeopleInput as I, PermissionAction as J, ManagedLifecycleItem as K, ListItemVersionsInput as L, ItemSharingPeoplePage as M, ListFolderChildrenInput as N, GetUploadStatusInput as O, ListIncomingSharesInput as P, PermissionPage as Q, ListWorkspaceItemsInput as R, EffectivePermissionResponse as S, WorkspaceDiscoveryItem as St, GetCurrentWorkspaceInput as T, WorkspaceItemSearchPage as Tt, ManagedItemVersionPage as U, ManagedItemMetadata as V, ManagedItemVersionResource as W, PermissionGrantee as X, PermissionGrant as Y, PermissionMutation as Z, DriveOperations as _, UploadFileProgressCallback as _t, CreateItemPermissionInput as a, RestoreItemInput as at, DriveServerClientConfig as b, UploadSession as bt, CurrentWorkspace as c, SearchWorkspaceItemsInput as ct, DownloadItemResult as d, UpdateItemPermissionInput as dt, ReadEffectiveItemPermissionsInput as et, DriveClient as f, UploadCompletion as ft, DriveOperationResult as g, UploadFileProgress as gt, DriveCredentialProvider as h, UploadFilePhase as ht, CreateFolderInput as i, RegisteredRecipientDisplay as it, IncomingSharePage as j, GetWorkspaceUsageInput as k, CurrentWorkspaceSources as l, TrashItemInput as lt, DriveCredentialContext as m, UploadFileInput as mt, CompleteUploadInput as n, RecordUploadPartInput as nt, CreateUploadInput as o, RestoreItemVersionInput as ot, DriveClientConfig as p, UploadConfirmedPart as pt, PendingUpload as q, CreateDownloadInput as r, RegisterItemRecipientInput as rt, CreateUploadPartDescriptorInput as s, RevokeItemPermissionInput as st, AbortUploadInput as t, ReadyUpload as tt, DeleteItemInput as u, UpdateItemInput as ut, DriveResponseValidators as v, UploadPartDescriptor as vt, FolderPage as w, WorkspaceItemSearchItem as wt, EffectivePermissionAction as x, UploadStatus as xt, DriveServerClient as y, UploadPartResult as yt, ManagedDownloadDescriptor as z };
7038
+ export { ManagedLifecycleItem as $, FolderPage as A, UploadStatus as At, ListFolderChildrenInput as B, WorkspaceDiscoveryItem as Bt, DriveServerClientConfig as C, UploadFilePhase as Ct, EffectivePermissionResponse as D, UploadPartDescriptor as Dt, EffectivePermissionAction as E, UploadFileVersionInput as Et, GetVisitorGrantInput as F, VisitorGrantCreation as Ft, ListWorkspaceItemsInput as G, operations as Gt, ListItemPermissionsInput as H, WorkspaceItemSearchItem as Ht, GetWorkspaceUsageInput as I, VisitorGrantPage as It, ManagedItemMetadata as J, ManagedDownloadDescriptor as K, IncomingShareContext as L, VisitorItem as Lt, GetItemInput as M, VisitorChildrenInput as Mt, GetItemVersionInput as N, VisitorDownloadInput as Nt, FileAccessContext as O, UploadPartResult as Ot, GetUploadStatusInput as P, VisitorGrant as Pt, ManagedItemVersionRestoreResult as Q, IncomingSharePage as R, VisitorReadInput as Rt, DriveServerClient as S, UploadFileInput as St, DriveVisitorClientConfig as T, UploadFileProgressCallback as Tt, ListItemSharingPeopleInput as U, WorkspaceItemSearchPage as Ut, ListIncomingSharesInput as V, WorkspaceDiscoveryPage as Vt, ListItemVersionsInput as W, WorkspaceUsage as Wt, ManagedItemVersionPage as X, ManagedItemVersion as Y, ManagedItemVersionResource as Z, DriveCredentialContext as _, TrashItemInput as _t, CreateFileVersionUploadInput as a, PermissionPage as at, DriveOperations as b, UploadCompletion as bt, CreateUploadInput as c, ReadyUpload as ct, CurrentWorkspace as d, RegisteredRecipientDisplay as dt, PendingUpload as et, CurrentWorkspaceSources as f, RestoreItemInput as ft, DriveClientConfig as g, SearchWorkspaceItemsInput as gt, DriveClient as h, RevokeVisitorGrantInput as ht, CreateDownloadInput as i, PermissionMutation as it, GetCurrentWorkspaceInput as j, VisitorChildren as jt, FolderItem as k, UploadSession as kt, CreateUploadPartDescriptorInput as l, RecordUploadPartInput as lt, DownloadItemResult as m, RevokeItemPermissionInput as mt, CommitFileVersionInput as n, PermissionGrant as nt, CreateFolderInput as o, ProtectionClassification as ot, DeleteItemInput as p, RestoreItemVersionInput as pt, ManagedDownloadRestorePending as q, CompleteUploadInput as r, PermissionGrantee as rt, CreateItemPermissionInput as s, ReadEffectiveItemPermissionsInput as st, AbortUploadInput as t, PermissionAction as tt, CreateVisitorGrantInput as u, RegisterItemRecipientInput as ut, DriveCredentialProvider as v, UpdateItemInput as vt, DriveVisitorClient as w, UploadFileProgress as wt, DriveResponseValidators as x, UploadConfirmedPart as xt, DriveOperationResult as y, UpdateItemPermissionInput as yt, ItemSharingPeoplePage as z, VisitorSession as zt };