@finueva/drive 0.6.0 → 0.8.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.
@@ -355,6 +355,312 @@ interface operations {
355
355
  };
356
356
  };
357
357
  };
358
+ getCurrentWorkspaceSources: {
359
+ parameters: {
360
+ query?: never;
361
+ header?: never;
362
+ path?: never;
363
+ cookie?: never;
364
+ };
365
+ requestBody?: never;
366
+ responses: {
367
+ /** @description One canonical managed volume. Known providers are not connections or health evidence. */
368
+ 200: {
369
+ headers: {
370
+ [name: string]: unknown;
371
+ };
372
+ content: {
373
+ "application/json": {
374
+ /** @enum {boolean} */
375
+ externalConnectionsSupported: false;
376
+ knownProviders: ("managed" | "google-drive" | "onedrive" | "dropbox" | "s3-compatible")[];
377
+ volumes: {
378
+ /** @enum {string} */
379
+ name: "Files";
380
+ /** @enum {string} */
381
+ provider: "managed";
382
+ rootItemId: string;
383
+ volumeId: string;
384
+ }[];
385
+ workspace: {
386
+ rootItemId: string;
387
+ rootVolumeId: string;
388
+ workspaceId: string;
389
+ workspaceReference: {
390
+ /** @enum {string} */
391
+ type: "personal";
392
+ userId: string;
393
+ } | {
394
+ organizationId: string;
395
+ /** @enum {string} */
396
+ type: "organization";
397
+ };
398
+ };
399
+ };
400
+ };
401
+ };
402
+ /** @description A valid Drive user bearer credential is required. */
403
+ 401: {
404
+ headers: {
405
+ [name: string]: unknown;
406
+ };
407
+ content: {
408
+ "application/json": {
409
+ error: {
410
+ /** @enum {string} */
411
+ code: "authentication_required";
412
+ details: Record<string, never>;
413
+ /** @enum {string} */
414
+ message: "Authentication is required.";
415
+ requestId: string;
416
+ };
417
+ };
418
+ };
419
+ };
420
+ /** @description Managed storage is disabled. */
421
+ 403: {
422
+ headers: {
423
+ [name: string]: unknown;
424
+ };
425
+ content: {
426
+ "application/json": {
427
+ error: {
428
+ /** @enum {string} */
429
+ code: "permission_denied";
430
+ details: Record<string, never>;
431
+ /** @enum {string} */
432
+ message: "The requested action is not permitted.";
433
+ requestId: string;
434
+ };
435
+ };
436
+ };
437
+ };
438
+ /** @description The current workspace is not provisioned or accessible. */
439
+ 404: {
440
+ headers: {
441
+ [name: string]: unknown;
442
+ };
443
+ content: {
444
+ "application/json": {
445
+ error: {
446
+ /** @enum {string} */
447
+ code: "resource_not_found";
448
+ details: Record<string, never>;
449
+ /** @enum {string} */
450
+ message: "The requested resource was not found.";
451
+ requestId: string;
452
+ };
453
+ };
454
+ };
455
+ };
456
+ /** @description Unsupported query input. */
457
+ 422: {
458
+ headers: {
459
+ [name: string]: unknown;
460
+ };
461
+ content: {
462
+ "application/json": {
463
+ error: {
464
+ /** @enum {string} */
465
+ code: "invalid_request";
466
+ details: Record<string, never>;
467
+ /** @enum {string} */
468
+ message: "The request is invalid.";
469
+ requestId: string;
470
+ };
471
+ };
472
+ };
473
+ };
474
+ /** @description Identity authority, D1, or canonical managed root is unavailable. */
475
+ 503: {
476
+ headers: {
477
+ [name: string]: unknown;
478
+ };
479
+ content: {
480
+ "application/json": {
481
+ error: {
482
+ /** @enum {string} */
483
+ code: "identity_authority_unavailable";
484
+ details: Record<string, never>;
485
+ /** @enum {string} */
486
+ message: "Authentication is temporarily unavailable.";
487
+ requestId: string;
488
+ };
489
+ } | {
490
+ error: {
491
+ /** @enum {string} */
492
+ code: "service_unavailable";
493
+ details: Record<string, never>;
494
+ /** @enum {string} */
495
+ message: "The service is temporarily unavailable.";
496
+ requestId: string;
497
+ };
498
+ };
499
+ };
500
+ };
501
+ };
502
+ };
503
+ listWorkspaceItems: {
504
+ parameters: {
505
+ query?: {
506
+ view?: "recent" | "shared" | "trash";
507
+ kind?: "file" | "folder";
508
+ creatorUserId?: string;
509
+ limit?: number;
510
+ cursor?: string;
511
+ };
512
+ header?: never;
513
+ path: {
514
+ workspaceId: string;
515
+ };
516
+ cookie?: never;
517
+ };
518
+ requestBody?: never;
519
+ responses: {
520
+ /** @description Authorized items and an authenticated continuation; no total count. */
521
+ 200: {
522
+ headers: {
523
+ [name: string]: unknown;
524
+ };
525
+ content: {
526
+ "application/json": {
527
+ items: {
528
+ createdAtEpochMilliseconds: number | null;
529
+ creatorUserId: string | null;
530
+ currentVersion: {
531
+ byteLength: number;
532
+ mediaType: string;
533
+ /** @enum {string} */
534
+ protectionClassification: "ordinary" | "opaque-encrypted";
535
+ /** @enum {string} */
536
+ state: "current";
537
+ versionId: string;
538
+ } | null;
539
+ etag: string;
540
+ itemId: string;
541
+ /** @enum {string} */
542
+ lifecycleState: "active" | "trashed";
543
+ modifiedAtEpochMilliseconds: number | null;
544
+ name: string;
545
+ parentId: string | null;
546
+ /** @enum {string} */
547
+ provider: "managed";
548
+ purgeAfterEpochMilliseconds: number | null;
549
+ revision: number;
550
+ trashedAtEpochMilliseconds: number | null;
551
+ /** @enum {string} */
552
+ type: "file" | "folder";
553
+ volumeId: string;
554
+ workspaceId: string;
555
+ }[];
556
+ nextCursor: string | null;
557
+ };
558
+ };
559
+ };
560
+ /** @description Authentication required. */
561
+ 401: {
562
+ headers: {
563
+ [name: string]: unknown;
564
+ };
565
+ content: {
566
+ "application/json": {
567
+ error: {
568
+ /** @enum {string} */
569
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
570
+ details: Record<string, never>;
571
+ message: string;
572
+ requestId: string;
573
+ };
574
+ };
575
+ };
576
+ };
577
+ /** @description The action is not permitted. */
578
+ 403: {
579
+ headers: {
580
+ [name: string]: unknown;
581
+ };
582
+ content: {
583
+ "application/json": {
584
+ error: {
585
+ /** @enum {string} */
586
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
587
+ details: Record<string, never>;
588
+ message: string;
589
+ requestId: string;
590
+ };
591
+ };
592
+ };
593
+ };
594
+ /** @description Workspace not found. */
595
+ 404: {
596
+ headers: {
597
+ [name: string]: unknown;
598
+ };
599
+ content: {
600
+ "application/json": {
601
+ error: {
602
+ /** @enum {string} */
603
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
604
+ details: Record<string, never>;
605
+ message: string;
606
+ requestId: string;
607
+ };
608
+ };
609
+ };
610
+ };
611
+ /** @description The selected authority or page changed; restart the query. */
612
+ 409: {
613
+ headers: {
614
+ [name: string]: unknown;
615
+ };
616
+ content: {
617
+ "application/json": {
618
+ error: {
619
+ /** @enum {string} */
620
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
621
+ details: Record<string, never>;
622
+ message: string;
623
+ requestId: string;
624
+ };
625
+ };
626
+ };
627
+ };
628
+ /** @description Invalid request or cursor. */
629
+ 422: {
630
+ headers: {
631
+ [name: string]: unknown;
632
+ };
633
+ content: {
634
+ "application/json": {
635
+ error: {
636
+ /** @enum {string} */
637
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
638
+ details: Record<string, never>;
639
+ message: string;
640
+ requestId: string;
641
+ };
642
+ };
643
+ };
644
+ };
645
+ /** @description Authoritative state is unavailable. */
646
+ 503: {
647
+ headers: {
648
+ [name: string]: unknown;
649
+ };
650
+ content: {
651
+ "application/json": {
652
+ error: {
653
+ /** @enum {string} */
654
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
655
+ details: Record<string, never>;
656
+ message: string;
657
+ requestId: string;
658
+ };
659
+ };
660
+ };
661
+ };
662
+ };
663
+ };
358
664
  getItem: {
359
665
  parameters: {
360
666
  query?: never;
@@ -3759,7 +4065,7 @@ interface operations {
3759
4065
  expiresAtEpochMilliseconds: number;
3760
4066
  itemId: string;
3761
4067
  /** @enum {string} */
3762
- lifecycle: "initiating" | "recovery-required" | "uploading" | "completing" | "provider-completed" | "ready" | "aborting" | "aborted";
4068
+ lifecycle: "initiating" | "recovery-required" | "uploading" | "completing" | "provider-completed" | "verifying" | "failed" | "ready" | "aborting" | "aborted";
3763
4069
  /** @enum {string} */
3764
4070
  mode: "presigned-multipart" | "server-mediated-zero-byte";
3765
4071
  nextAfterPartNumber: number | null;
@@ -3772,7 +4078,7 @@ interface operations {
3772
4078
  };
3773
4079
  ready: {
3774
4080
  byteLength: number;
3775
- /** @description Caller-declared whole-file SHA-256 metadata; archive publication is gated by provider checksum evidence. */
4081
+ /** @description Caller-declared whole-file SHA-256. Portable profiles independently verify file bytes before publication; legacy profiles retain provider-checksum semantics. */
3776
4082
  callerDeclaredContentDigest: string;
3777
4083
  displayFilename: string;
3778
4084
  itemId: string;
@@ -3784,6 +4090,13 @@ interface operations {
3784
4090
  } | null;
3785
4091
  revision: number;
3786
4092
  uploadId: string;
4093
+ verification?: {
4094
+ revision: number;
4095
+ /** @enum {string} */
4096
+ state: "pending" | "verified" | "failed";
4097
+ totalByteLength: number;
4098
+ verifiedByteLength: number;
4099
+ };
3787
4100
  versionId: string;
3788
4101
  };
3789
4102
  };
@@ -4058,7 +4371,7 @@ interface operations {
4058
4371
  content: {
4059
4372
  "application/json": {
4060
4373
  byteLength: number;
4061
- /** @description Caller-declared whole-file SHA-256 metadata; archive publication is gated by provider checksum evidence. */
4374
+ /** @description Caller-declared whole-file SHA-256. Portable profiles independently verify file bytes before publication; legacy profiles retain provider-checksum semantics. */
4062
4375
  callerDeclaredContentDigest: string;
4063
4376
  displayFilename: string;
4064
4377
  itemId: string;
@@ -4070,6 +4383,24 @@ interface operations {
4070
4383
  };
4071
4384
  };
4072
4385
  };
4386
+ /** @description Archive verification is pending; retry completion with the same key. */
4387
+ 202: {
4388
+ headers: {
4389
+ [name: string]: unknown;
4390
+ };
4391
+ content: {
4392
+ "application/json": {
4393
+ itemId: string;
4394
+ /** @enum {string} */
4395
+ state: "verifying";
4396
+ totalByteLength: number;
4397
+ uploadId: string;
4398
+ verificationRevision: number;
4399
+ verifiedByteLength: number;
4400
+ versionId: string;
4401
+ };
4402
+ };
4403
+ };
4073
4404
  /** @description Authentication is required. */
4074
4405
  401: {
4075
4406
  headers: {
@@ -4221,6 +4552,7 @@ interface operations {
4221
4552
  content: {
4222
4553
  "application/json": {
4223
4554
  checksumSha256: string;
4555
+ contentMd5: string;
4224
4556
  partNumber: number;
4225
4557
  };
4226
4558
  };
@@ -4236,7 +4568,7 @@ interface operations {
4236
4568
  expectedByteLength: number;
4237
4569
  expiresAtEpochMilliseconds: number;
4238
4570
  headers: {
4239
- "x-amz-checksum-sha256": string;
4571
+ "content-md5": string;
4240
4572
  };
4241
4573
  /** @enum {string} */
4242
4574
  method: "PUT";
@@ -4536,6 +4868,144 @@ interface operations {
4536
4868
  };
4537
4869
  };
4538
4870
  };
4871
+ getWorkspaceUsage: {
4872
+ parameters: {
4873
+ query?: never;
4874
+ header?: never;
4875
+ path: {
4876
+ workspaceId: string;
4877
+ };
4878
+ cookie?: never;
4879
+ };
4880
+ requestBody?: never;
4881
+ responses: {
4882
+ /** @description Current committed and retained reserved bytes, not physical archive usage. */
4883
+ 200: {
4884
+ headers: {
4885
+ [name: string]: unknown;
4886
+ };
4887
+ content: {
4888
+ "application/json": {
4889
+ /** @enum {string} */
4890
+ accounting: "current-versions-and-reservations";
4891
+ availableBytes: string;
4892
+ limitBytes: string;
4893
+ /** @enum {string} */
4894
+ provider: "managed";
4895
+ reservedBytes: string;
4896
+ /** @enum {boolean} */
4897
+ reservedBytesIncludeUnresolvedUploads: true;
4898
+ unresolvedReservedBytes: string;
4899
+ usedBytes: string;
4900
+ warnings: "unresolved-archive-ownership"[];
4901
+ workspaceId: string;
4902
+ };
4903
+ };
4904
+ };
4905
+ /** @description Authentication required. */
4906
+ 401: {
4907
+ headers: {
4908
+ [name: string]: unknown;
4909
+ };
4910
+ content: {
4911
+ "application/json": {
4912
+ error: {
4913
+ /** @enum {string} */
4914
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
4915
+ details: Record<string, never>;
4916
+ message: string;
4917
+ requestId: string;
4918
+ };
4919
+ };
4920
+ };
4921
+ };
4922
+ /** @description The action is not permitted. */
4923
+ 403: {
4924
+ headers: {
4925
+ [name: string]: unknown;
4926
+ };
4927
+ content: {
4928
+ "application/json": {
4929
+ error: {
4930
+ /** @enum {string} */
4931
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
4932
+ details: Record<string, never>;
4933
+ message: string;
4934
+ requestId: string;
4935
+ };
4936
+ };
4937
+ };
4938
+ };
4939
+ /** @description Workspace not found. */
4940
+ 404: {
4941
+ headers: {
4942
+ [name: string]: unknown;
4943
+ };
4944
+ content: {
4945
+ "application/json": {
4946
+ error: {
4947
+ /** @enum {string} */
4948
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
4949
+ details: Record<string, never>;
4950
+ message: string;
4951
+ requestId: string;
4952
+ };
4953
+ };
4954
+ };
4955
+ };
4956
+ /** @description The selected authority or page changed; restart the query. */
4957
+ 409: {
4958
+ headers: {
4959
+ [name: string]: unknown;
4960
+ };
4961
+ content: {
4962
+ "application/json": {
4963
+ error: {
4964
+ /** @enum {string} */
4965
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
4966
+ details: Record<string, never>;
4967
+ message: string;
4968
+ requestId: string;
4969
+ };
4970
+ };
4971
+ };
4972
+ };
4973
+ /** @description Invalid request or cursor. */
4974
+ 422: {
4975
+ headers: {
4976
+ [name: string]: unknown;
4977
+ };
4978
+ content: {
4979
+ "application/json": {
4980
+ error: {
4981
+ /** @enum {string} */
4982
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
4983
+ details: Record<string, never>;
4984
+ message: string;
4985
+ requestId: string;
4986
+ };
4987
+ };
4988
+ };
4989
+ };
4990
+ /** @description Authoritative state is unavailable. */
4991
+ 503: {
4992
+ headers: {
4993
+ [name: string]: unknown;
4994
+ };
4995
+ content: {
4996
+ "application/json": {
4997
+ error: {
4998
+ /** @enum {string} */
4999
+ code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
5000
+ details: Record<string, never>;
5001
+ message: string;
5002
+ requestId: string;
5003
+ };
5004
+ };
5005
+ };
5006
+ };
5007
+ };
5008
+ };
4539
5009
  }
4540
5010
  //#endregion
4541
5011
  //#region src/types.d.ts
@@ -4584,6 +5054,35 @@ type CreateDownloadPath = operations["createDownload"]["parameters"]["path"];
4584
5054
  type CreateDownloadQuery = NonNullable<operations["createDownload"]["parameters"]["query"]>;
4585
5055
  type CreateDownloadHeaders = operations["createDownload"]["parameters"]["header"];
4586
5056
  type GeneratedCurrentWorkspace = JsonResponse<"getCurrentWorkspace", 200>;
5057
+ type GeneratedDiscoveryPage = JsonResponse<"listWorkspaceItems", 200>;
5058
+ type WorkspaceDiscoveryItem = Readonly<Omit<GeneratedDiscoveryPage["items"][number], "currentVersion"> & {
5059
+ readonly currentVersion: ManagedItemMetadata["currentVersion"];
5060
+ }>;
5061
+ type WorkspaceDiscoveryPage = Readonly<{
5062
+ items: readonly WorkspaceDiscoveryItem[];
5063
+ nextCursor: string | null;
5064
+ }>;
5065
+ type GeneratedWorkspaceUsage = JsonResponse<"getWorkspaceUsage", 200>;
5066
+ type WorkspaceUsage = Readonly<Omit<GeneratedWorkspaceUsage, "warnings"> & {
5067
+ readonly warnings: readonly GeneratedWorkspaceUsage["warnings"][number][];
5068
+ }>;
5069
+ interface GetWorkspaceUsageInput {
5070
+ readonly workspaceId: string;
5071
+ readonly signal?: AbortSignal;
5072
+ }
5073
+ interface ListWorkspaceItemsInput extends GetWorkspaceUsageInput {
5074
+ readonly view?: "recent" | "shared" | "trash";
5075
+ readonly kind?: "file" | "folder";
5076
+ readonly creatorUserId?: string;
5077
+ readonly limit?: number;
5078
+ readonly cursor?: string;
5079
+ }
5080
+ type GeneratedCurrentWorkspaceSources = JsonResponse<"getCurrentWorkspaceSources", 200>;
5081
+ type CurrentWorkspaceSources = Readonly<Omit<GeneratedCurrentWorkspaceSources, "workspace" | "volumes" | "knownProviders"> & {
5082
+ readonly workspace: CurrentWorkspace;
5083
+ readonly volumes: readonly Readonly<GeneratedCurrentWorkspaceSources["volumes"][number]>[];
5084
+ readonly knownProviders: readonly GeneratedCurrentWorkspaceSources["knownProviders"][number][];
5085
+ }>;
4587
5086
  type CurrentWorkspace = Readonly<Omit<GeneratedCurrentWorkspace, "workspaceReference"> & {
4588
5087
  readonly workspaceReference: Readonly<GeneratedCurrentWorkspace["workspaceReference"]>;
4589
5088
  }>;
@@ -4594,6 +5093,8 @@ type UploadPartDescriptor = Readonly<Omit<JsonResponse<"createUploadPartDescript
4594
5093
  }>;
4595
5094
  type UploadPartResult = Readonly<JsonResponse<"recordUploadPart", 200>>;
4596
5095
  type ReadyUpload = Readonly<JsonResponse<"completeUpload", 200>>;
5096
+ type PendingUpload = Readonly<JsonResponse<"completeUpload", 202>>;
5097
+ type UploadCompletion = ReadyUpload | PendingUpload;
4597
5098
  type ManagedLifecycleItem = Readonly<JsonResponse<"updateItem", 200>>;
4598
5099
  type GeneratedManagedItemMetadata = JsonResponse<"getItem", 200>;
4599
5100
  type ManagedItemMetadata = Readonly<Omit<GeneratedManagedItemMetadata, "currentVersion"> & {
@@ -4620,10 +5121,11 @@ type ManagedDownloadDescriptor = Readonly<Omit<JsonResponse<"createDownload", 20
4620
5121
  type ManagedDownloadRestorePending = Readonly<JsonResponse<"createDownload", 202>>;
4621
5122
  type GeneratedUploadStatus = JsonResponse<"getUploadStatus", 200>;
4622
5123
  type UploadConfirmedPart = Readonly<GeneratedUploadStatus["confirmedParts"][number]>;
4623
- type UploadStatus = Readonly<Omit<GeneratedUploadStatus, "confirmedParts" | "partPolicy" | "ready"> & {
5124
+ type UploadStatus = Readonly<Omit<GeneratedUploadStatus, "confirmedParts" | "partPolicy" | "ready" | "verification"> & {
4624
5125
  readonly confirmedParts: readonly UploadConfirmedPart[];
4625
5126
  readonly partPolicy: Readonly<GeneratedUploadStatus["partPolicy"]>;
4626
5127
  readonly ready: ReadyUpload | null;
5128
+ readonly verification?: Readonly<NonNullable<GeneratedUploadStatus["verification"]>>;
4627
5129
  }>;
4628
5130
  type ProtectionClassification = CreateUploadBody["protectionClassification"];
4629
5131
  type PermissionAction = CreatePermissionBody["actions"][number];
@@ -4763,7 +5265,7 @@ type CreateDownloadInput = Readonly<CreateDownloadPath> & Readonly<CreateDownloa
4763
5265
  readonly signal?: AbortSignal;
4764
5266
  };
4765
5267
  type DownloadItemResult = Response | DriveOperationResult<ManagedDownloadRestorePending, 202> | DriveOperationResult<undefined, 304>;
4766
- type UploadFilePhase = "preparing" | "uploading" | "completing";
5268
+ type UploadFilePhase = "preparing" | "uploading" | "completing" | "verifying";
4767
5269
  interface UploadFileProgress {
4768
5270
  readonly phase: UploadFilePhase;
4769
5271
  readonly confirmedByteLength: number;
@@ -4788,6 +5290,9 @@ interface GetCurrentWorkspaceInput {
4788
5290
  readonly signal?: AbortSignal;
4789
5291
  }
4790
5292
  interface DriveOperations {
5293
+ listWorkspaceItems(input: ListWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceDiscoveryPage, 200>>;
5294
+ getWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<WorkspaceUsage, 200>>;
5295
+ getCurrentWorkspaceSources(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspaceSources, 200>>;
4791
5296
  getCurrentWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
4792
5297
  getItem(input: GetItemInput): Promise<DriveOperationResult<ManagedItemMetadata, 200>>;
4793
5298
  searchWorkspaceItems(input: SearchWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceItemSearchPage, 200>>;
@@ -4811,12 +5316,12 @@ interface DriveOperations {
4811
5316
  getUploadStatus(input: GetUploadStatusInput): Promise<DriveOperationResult<UploadStatus, 200>>;
4812
5317
  createUploadPartDescriptor(input: CreateUploadPartDescriptorInput): Promise<DriveOperationResult<UploadPartDescriptor, 200>>;
4813
5318
  recordUploadPart(input: RecordUploadPartInput): Promise<DriveOperationResult<UploadPartResult, 200>>;
4814
- completeUpload(input: CompleteUploadInput): Promise<DriveOperationResult<ReadyUpload, 200>>;
5319
+ completeUpload(input: CompleteUploadInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
4815
5320
  abortUpload(input: AbortUploadInput): Promise<DriveOperationResult<undefined, 204>>;
4816
5321
  }
4817
5322
  interface DriveServerClient extends DriveOperations {}
4818
5323
  interface DriveClient extends DriveOperations {
4819
- uploadFile(input: UploadFileInput): Promise<DriveOperationResult<ReadyUpload, 200>>;
5324
+ uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
4820
5325
  }
4821
5326
  //#endregion
4822
- export { UpdateItemInput as $, ListItemVersionsInput as A, PermissionGrant as B, FolderPage as C, GetUploadStatusInput as D, GetItemVersionInput as E, ManagedItemVersionPage as F, ReadEffectiveItemPermissionsInput as G, PermissionMutation as H, ManagedItemVersionResource as I, RestoreItemInput as J, ReadyUpload as K, ManagedItemVersionRestoreResult as L, ManagedDownloadRestorePending as M, ManagedItemMetadata as N, ListFolderChildrenInput as O, ManagedItemVersion as P, TrashItemInput as Q, ManagedLifecycleItem as R, FolderItem as S, GetItemInput as T, PermissionPage as U, PermissionGrantee as V, ProtectionClassification as W, RevokeItemPermissionInput as X, RestoreItemVersionInput as Y, SearchWorkspaceItemsInput as Z, DriveResponseValidators as _, CreateItemPermissionInput as a, UploadFileProgressCallback as at, EffectivePermissionAction as b, CurrentWorkspace as c, UploadSession as ct, DriveClient as d, WorkspaceItemSearchPage as dt, UpdateItemPermissionInput as et, DriveClientConfig as f, operations as ft, DriveOperations as g, DriveOperationResult as h, CreateFolderInput as i, UploadFileProgress as it, ManagedDownloadDescriptor as j, ListItemPermissionsInput as k, DeleteItemInput as l, UploadStatus as lt, DriveCredentialProvider as m, CompleteUploadInput as n, UploadFileInput as nt, CreateUploadInput as o, UploadPartDescriptor as ot, DriveCredentialContext as p, RecordUploadPartInput as q, CreateDownloadInput as r, UploadFilePhase as rt, CreateUploadPartDescriptorInput as s, UploadPartResult as st, AbortUploadInput as t, UploadConfirmedPart as tt, DownloadItemResult as u, WorkspaceItemSearchItem as ut, DriveServerClient as v, GetCurrentWorkspaceInput as w, EffectivePermissionResponse as x, DriveServerClientConfig as y, PermissionAction as z };
5327
+ export { RestoreItemVersionInput as $, ListFolderChildrenInput as A, ManagedItemVersionRestoreResult as B, FolderItem as C, GetItemVersionInput as D, GetItemInput as E, ManagedDownloadRestorePending as F, PermissionGrantee as G, PendingUpload as H, ManagedItemMetadata as I, ProtectionClassification as J, PermissionMutation as K, ManagedItemVersion as L, ListItemVersionsInput as M, ListWorkspaceItemsInput as N, GetUploadStatusInput as O, ManagedDownloadDescriptor as P, RestoreItemInput as Q, ManagedItemVersionPage as R, EffectivePermissionResponse as S, GetCurrentWorkspaceInput as T, PermissionAction as U, ManagedLifecycleItem as V, PermissionGrant as W, ReadyUpload as X, ReadEffectiveItemPermissionsInput as Y, RecordUploadPartInput as Z, DriveOperations as _, WorkspaceItemSearchItem as _t, CreateItemPermissionInput as a, UploadCompletion as at, DriveServerClientConfig as b, operations as bt, CurrentWorkspace as c, UploadFilePhase as ct, DownloadItemResult as d, UploadPartDescriptor as dt, RevokeItemPermissionInput as et, DriveClient as f, UploadPartResult as ft, DriveOperationResult as g, WorkspaceDiscoveryPage as gt, DriveCredentialProvider as h, WorkspaceDiscoveryItem as ht, CreateFolderInput as i, UpdateItemPermissionInput as it, ListItemPermissionsInput as j, GetWorkspaceUsageInput as k, CurrentWorkspaceSources as l, UploadFileProgress as lt, DriveCredentialContext as m, UploadStatus as mt, CompleteUploadInput as n, TrashItemInput as nt, CreateUploadInput as o, UploadConfirmedPart as ot, DriveClientConfig as p, UploadSession as pt, PermissionPage as q, CreateDownloadInput as r, UpdateItemInput as rt, CreateUploadPartDescriptorInput as s, UploadFileInput as st, AbortUploadInput as t, SearchWorkspaceItemsInput as tt, DeleteItemInput as u, UploadFileProgressCallback as ut, DriveResponseValidators as v, WorkspaceItemSearchPage as vt, FolderPage as w, EffectivePermissionAction as x, DriveServerClient as y, WorkspaceUsage as yt, ManagedItemVersionResource as z };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as UpdateItemInput, A as ListItemVersionsInput, B as PermissionGrant, C as FolderPage, D as GetUploadStatusInput, E as GetItemVersionInput, F as ManagedItemVersionPage, G as ReadEffectiveItemPermissionsInput, H as PermissionMutation, I as ManagedItemVersionResource, J as RestoreItemInput, K as ReadyUpload, L as ManagedItemVersionRestoreResult, M as ManagedDownloadRestorePending, N as ManagedItemMetadata, O as ListFolderChildrenInput, P as ManagedItemVersion, Q as TrashItemInput, R as ManagedLifecycleItem, S as FolderItem, T as GetItemInput, V as PermissionGrantee, W as ProtectionClassification, X as RevokeItemPermissionInput, Y as RestoreItemVersionInput, Z as SearchWorkspaceItemsInput, _ as DriveResponseValidators, a as CreateItemPermissionInput, at as UploadFileProgressCallback, b as EffectivePermissionAction, c as CurrentWorkspace, ct as UploadSession, d as DriveClient, dt as WorkspaceItemSearchPage, et as UpdateItemPermissionInput, f as DriveClientConfig, g as DriveOperations, h as DriveOperationResult, i as CreateFolderInput, it as UploadFileProgress, j as ManagedDownloadDescriptor, k as ListItemPermissionsInput, l as DeleteItemInput, lt as UploadStatus, m as DriveCredentialProvider, n as CompleteUploadInput, nt as UploadFileInput, o as CreateUploadInput, ot as UploadPartDescriptor, q as RecordUploadPartInput, r as CreateDownloadInput, rt as UploadFilePhase, s as CreateUploadPartDescriptorInput, st as UploadPartResult, t as AbortUploadInput, tt as UploadConfirmedPart, u as DownloadItemResult, ut as WorkspaceItemSearchItem, w as GetCurrentWorkspaceInput, z as PermissionAction } from "./contract.js";
1
+ import { $ as RestoreItemVersionInput, A as ListFolderChildrenInput, B as ManagedItemVersionRestoreResult, C as FolderItem, D as GetItemVersionInput, E as GetItemInput, F as ManagedDownloadRestorePending, G as PermissionGrantee, H as PendingUpload, I as ManagedItemMetadata, J as ProtectionClassification, K as PermissionMutation, L as ManagedItemVersion, M as ListItemVersionsInput, N as ListWorkspaceItemsInput, O as GetUploadStatusInput, P as ManagedDownloadDescriptor, Q as RestoreItemInput, R as ManagedItemVersionPage, T as GetCurrentWorkspaceInput, U as PermissionAction, V as ManagedLifecycleItem, W as PermissionGrant, X as ReadyUpload, Y as ReadEffectiveItemPermissionsInput, Z as RecordUploadPartInput, _ as DriveOperations, _t as WorkspaceItemSearchItem, a as CreateItemPermissionInput, at as UploadCompletion, c as CurrentWorkspace, ct as UploadFilePhase, d as DownloadItemResult, dt as UploadPartDescriptor, et as RevokeItemPermissionInput, f as DriveClient, ft as UploadPartResult, g as DriveOperationResult, gt as WorkspaceDiscoveryPage, h as DriveCredentialProvider, ht as WorkspaceDiscoveryItem, i as CreateFolderInput, it as UpdateItemPermissionInput, j as ListItemPermissionsInput, k as GetWorkspaceUsageInput, l as CurrentWorkspaceSources, lt as UploadFileProgress, mt as UploadStatus, n as CompleteUploadInput, nt as TrashItemInput, o as CreateUploadInput, ot as UploadConfirmedPart, p as DriveClientConfig, pt as UploadSession, r as CreateDownloadInput, rt as UpdateItemInput, s as CreateUploadPartDescriptorInput, st as UploadFileInput, t as AbortUploadInput, tt as SearchWorkspaceItemsInput, u as DeleteItemInput, ut as UploadFileProgressCallback, v as DriveResponseValidators, vt as WorkspaceItemSearchPage, w as FolderPage, x as EffectivePermissionAction, yt as WorkspaceUsage, z as ManagedItemVersionResource } from "./contract.js";
2
2
  import { createDriveClient } from "./client.js";
3
3
  import { DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DriveApiErrorCode, DriveError, DriveErrorCode, DriveSdkErrorCode } from "./core.js";
4
- export { type AbortUploadInput, type CompleteUploadInput, type CreateDownloadInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CurrentWorkspace, DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, type DeleteItemInput, type DownloadItemResult, type DriveApiErrorCode, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, DriveError, type DriveErrorCode, type DriveOperationResult, type DriveOperations, type DriveResponseValidators, type DriveSdkErrorCode, type EffectivePermissionAction, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type ListFolderChildrenInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type ProtectionClassification, type ReadEffectiveItemPermissionsInput, type ReadyUpload, type RecordUploadPartInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UploadConfirmedPart, type UploadFileInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadPartDescriptor, type UploadPartResult, type UploadSession, type UploadStatus, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, createDriveClient };
4
+ export { type AbortUploadInput, type CompleteUploadInput, type CreateDownloadInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CurrentWorkspace, type CurrentWorkspaceSources, DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, type DeleteItemInput, type DownloadItemResult, type DriveApiErrorCode, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, DriveError, type DriveErrorCode, type DriveOperationResult, type DriveOperations, type DriveResponseValidators, type DriveSdkErrorCode, type EffectivePermissionAction, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type GetWorkspaceUsageInput, type ListFolderChildrenInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PendingUpload, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type ProtectionClassification, type ReadEffectiveItemPermissionsInput, type ReadyUpload, type RecordUploadPartInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UploadCompletion, type UploadConfirmedPart, type UploadFileInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadPartDescriptor, type UploadPartResult, type UploadSession, type UploadStatus, type WorkspaceDiscoveryItem, type WorkspaceDiscoveryPage, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, type WorkspaceUsage, createDriveClient };