@finueva/drive 0.28.0 → 0.30.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.
@@ -4133,7 +4133,7 @@ interface operations {
4133
4133
  };
4134
4134
  };
4135
4135
  };
4136
- /** @description The idempotency key was reused for a different semantic request. */
4136
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
4137
4137
  409: {
4138
4138
  headers: {
4139
4139
  [name: string]: unknown;
@@ -4148,6 +4148,18 @@ interface operations {
4148
4148
  message: "The idempotency key conflicts with an earlier request.";
4149
4149
  requestId: string;
4150
4150
  };
4151
+ } | {
4152
+ error: {
4153
+ /** @enum {string} */
4154
+ code: "precondition_failed";
4155
+ details: {
4156
+ /** @enum {string} */
4157
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
4158
+ };
4159
+ /** @enum {string} */
4160
+ message: "The request precondition failed.";
4161
+ requestId: string;
4162
+ };
4151
4163
  };
4152
4164
  };
4153
4165
  };
@@ -4534,7 +4546,7 @@ interface operations {
4534
4546
  };
4535
4547
  };
4536
4548
  };
4537
- /** @description The idempotency key was reused for a different semantic request. */
4549
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
4538
4550
  409: {
4539
4551
  headers: {
4540
4552
  [name: string]: unknown;
@@ -4549,6 +4561,18 @@ interface operations {
4549
4561
  message: "The idempotency key conflicts with an earlier request.";
4550
4562
  requestId: string;
4551
4563
  };
4564
+ } | {
4565
+ error: {
4566
+ /** @enum {string} */
4567
+ code: "precondition_failed";
4568
+ details: {
4569
+ /** @enum {string} */
4570
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
4571
+ };
4572
+ /** @enum {string} */
4573
+ message: "The request precondition failed.";
4574
+ requestId: string;
4575
+ };
4552
4576
  };
4553
4577
  };
4554
4578
  };
@@ -4731,7 +4755,7 @@ interface operations {
4731
4755
  };
4732
4756
  };
4733
4757
  };
4734
- /** @description The idempotency key was reused for a different semantic request. */
4758
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
4735
4759
  409: {
4736
4760
  headers: {
4737
4761
  [name: string]: unknown;
@@ -4746,6 +4770,18 @@ interface operations {
4746
4770
  message: "The idempotency key conflicts with an earlier request.";
4747
4771
  requestId: string;
4748
4772
  };
4773
+ } | {
4774
+ error: {
4775
+ /** @enum {string} */
4776
+ code: "precondition_failed";
4777
+ details: {
4778
+ /** @enum {string} */
4779
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
4780
+ };
4781
+ /** @enum {string} */
4782
+ message: "The request precondition failed.";
4783
+ requestId: string;
4784
+ };
4749
4785
  };
4750
4786
  };
4751
4787
  };
@@ -4928,7 +4964,7 @@ interface operations {
4928
4964
  };
4929
4965
  };
4930
4966
  };
4931
- /** @description The idempotency key was reused for a different semantic request. */
4967
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
4932
4968
  409: {
4933
4969
  headers: {
4934
4970
  [name: string]: unknown;
@@ -4943,6 +4979,18 @@ interface operations {
4943
4979
  message: "The idempotency key conflicts with an earlier request.";
4944
4980
  requestId: string;
4945
4981
  };
4982
+ } | {
4983
+ error: {
4984
+ /** @enum {string} */
4985
+ code: "precondition_failed";
4986
+ details: {
4987
+ /** @enum {string} */
4988
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
4989
+ };
4990
+ /** @enum {string} */
4991
+ message: "The request precondition failed.";
4992
+ requestId: string;
4993
+ };
4946
4994
  };
4947
4995
  };
4948
4996
  };
@@ -5146,7 +5194,7 @@ interface operations {
5146
5194
  };
5147
5195
  };
5148
5196
  };
5149
- /** @description The idempotency key was reused for a different semantic request. */
5197
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
5150
5198
  409: {
5151
5199
  headers: {
5152
5200
  [name: string]: unknown;
@@ -5161,6 +5209,18 @@ interface operations {
5161
5209
  message: "The idempotency key conflicts with an earlier request.";
5162
5210
  requestId: string;
5163
5211
  };
5212
+ } | {
5213
+ error: {
5214
+ /** @enum {string} */
5215
+ code: "precondition_failed";
5216
+ details: {
5217
+ /** @enum {string} */
5218
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
5219
+ };
5220
+ /** @enum {string} */
5221
+ message: "The request precondition failed.";
5222
+ requestId: string;
5223
+ };
5164
5224
  };
5165
5225
  };
5166
5226
  };
@@ -5562,7 +5622,7 @@ interface operations {
5562
5622
  };
5563
5623
  content?: never;
5564
5624
  };
5565
- /** @description Idempotency conflict or registration_conflict: the resolved recipient does not match the expected user. */
5625
+ /** @description Idempotency conflict, a nonretryable sharing limit, or registration_conflict: the resolved recipient does not match the expected user. */
5566
5626
  409: {
5567
5627
  headers: {
5568
5628
  [name: string]: unknown;
@@ -5577,6 +5637,18 @@ interface operations {
5577
5637
  message: "The idempotency key conflicts with an earlier request.";
5578
5638
  requestId: string;
5579
5639
  };
5640
+ } | {
5641
+ error: {
5642
+ /** @enum {string} */
5643
+ code: "precondition_failed";
5644
+ details: {
5645
+ /** @enum {string} */
5646
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
5647
+ };
5648
+ /** @enum {string} */
5649
+ message: "The request precondition failed.";
5650
+ requestId: string;
5651
+ };
5580
5652
  } | {
5581
5653
  error: {
5582
5654
  /** @enum {string} */
@@ -5670,6 +5742,339 @@ interface operations {
5670
5742
  };
5671
5743
  };
5672
5744
  };
5745
+ registerItemRecipients: {
5746
+ parameters: {
5747
+ query?: never;
5748
+ header: {
5749
+ "Idempotency-Key": string;
5750
+ "If-Match": string;
5751
+ };
5752
+ path: {
5753
+ workspaceId: string;
5754
+ itemId: string;
5755
+ };
5756
+ cookie?: never;
5757
+ };
5758
+ requestBody: {
5759
+ content: {
5760
+ "application/json": {
5761
+ /** @description Distinct recipients in result order. Each entry has the registerItemRecipient body shape; a repeated selector is invalid. */
5762
+ recipients: ({
5763
+ /** @description Normalized email, at most 320 UTF-8 bytes. */
5764
+ email?: string;
5765
+ /** @description Require the freshly resolved Auth user ID to match before creating a grant. A mismatch returns registration_conflict without mutation. */
5766
+ expectedRecipientUserId?: string;
5767
+ /** @enum {string} */
5768
+ role: "viewer" | "editor";
5769
+ /** @description Exact canonical Auth User ID; Auth verifies current recipient eligibility. */
5770
+ userId?: string;
5771
+ } & (unknown | unknown))[];
5772
+ };
5773
+ };
5774
+ };
5775
+ responses: {
5776
+ /** @description No new grant was committed: every recipient was replayed, already present or refused individually. */
5777
+ 200: {
5778
+ headers: {
5779
+ [name: string]: unknown;
5780
+ };
5781
+ content: {
5782
+ "application/json": {
5783
+ collectionEtag: string;
5784
+ collectionRevision: number;
5785
+ results: ({
5786
+ grant: {
5787
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
5788
+ /** @enum {string} */
5789
+ availability: "active" | "expired" | "revoked";
5790
+ expiresAtEpochMilliseconds: number | null;
5791
+ grantId: string;
5792
+ grantee: {
5793
+ /** @enum {string} */
5794
+ type: "user";
5795
+ userId: string;
5796
+ } | {
5797
+ teamId: string;
5798
+ /** @enum {string} */
5799
+ type: "team";
5800
+ };
5801
+ revision: number;
5802
+ /** @enum {string} */
5803
+ source: "direct";
5804
+ sourceItemId: string;
5805
+ };
5806
+ grantEtag: string | null;
5807
+ /** @enum {string} */
5808
+ outcome: "added";
5809
+ /** @description True when an exact retry returns the grant this batch created earlier. */
5810
+ replayed: boolean;
5811
+ } | {
5812
+ grant: {
5813
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
5814
+ /** @enum {string} */
5815
+ availability: "active" | "expired" | "revoked";
5816
+ expiresAtEpochMilliseconds: number | null;
5817
+ grantId: string;
5818
+ grantee: {
5819
+ /** @enum {string} */
5820
+ type: "user";
5821
+ userId: string;
5822
+ } | {
5823
+ teamId: string;
5824
+ /** @enum {string} */
5825
+ type: "team";
5826
+ };
5827
+ revision: number;
5828
+ /** @enum {string} */
5829
+ source: "direct";
5830
+ sourceItemId: string;
5831
+ } & unknown;
5832
+ grantEtag: string | null;
5833
+ /** @enum {string} */
5834
+ outcome: "already_present";
5835
+ } | {
5836
+ /** @enum {string} */
5837
+ outcome: "refused";
5838
+ /** @enum {string} */
5839
+ reason: "recipient_unavailable" | "registration_conflict" | "duplicate_recipient";
5840
+ })[];
5841
+ };
5842
+ };
5843
+ };
5844
+ /** @description Every new grant committed together under the collection precondition. */
5845
+ 201: {
5846
+ headers: {
5847
+ [name: string]: unknown;
5848
+ };
5849
+ content: {
5850
+ "application/json": {
5851
+ collectionEtag: string;
5852
+ collectionRevision: number;
5853
+ results: ({
5854
+ grant: {
5855
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
5856
+ /** @enum {string} */
5857
+ availability: "active" | "expired" | "revoked";
5858
+ expiresAtEpochMilliseconds: number | null;
5859
+ grantId: string;
5860
+ grantee: {
5861
+ /** @enum {string} */
5862
+ type: "user";
5863
+ userId: string;
5864
+ } | {
5865
+ teamId: string;
5866
+ /** @enum {string} */
5867
+ type: "team";
5868
+ };
5869
+ revision: number;
5870
+ /** @enum {string} */
5871
+ source: "direct";
5872
+ sourceItemId: string;
5873
+ };
5874
+ grantEtag: string | null;
5875
+ /** @enum {string} */
5876
+ outcome: "added";
5877
+ /** @description True when an exact retry returns the grant this batch created earlier. */
5878
+ replayed: boolean;
5879
+ } | {
5880
+ grant: {
5881
+ actions: ("items:content:read" | "items:create" | "items:delete" | "items:metadata:read" | "items:permissions:read" | "items:update")[];
5882
+ /** @enum {string} */
5883
+ availability: "active" | "expired" | "revoked";
5884
+ expiresAtEpochMilliseconds: number | null;
5885
+ grantId: string;
5886
+ grantee: {
5887
+ /** @enum {string} */
5888
+ type: "user";
5889
+ userId: string;
5890
+ } | {
5891
+ teamId: string;
5892
+ /** @enum {string} */
5893
+ type: "team";
5894
+ };
5895
+ revision: number;
5896
+ /** @enum {string} */
5897
+ source: "direct";
5898
+ sourceItemId: string;
5899
+ } & unknown;
5900
+ grantEtag: string | null;
5901
+ /** @enum {string} */
5902
+ outcome: "already_present";
5903
+ } | {
5904
+ /** @enum {string} */
5905
+ outcome: "refused";
5906
+ /** @enum {string} */
5907
+ reason: "recipient_unavailable" | "registration_conflict" | "duplicate_recipient";
5908
+ })[];
5909
+ };
5910
+ };
5911
+ };
5912
+ /** @description A valid Drive user bearer credential is required. */
5913
+ 401: {
5914
+ headers: {
5915
+ [name: string]: unknown;
5916
+ };
5917
+ content: {
5918
+ "application/json": {
5919
+ error: {
5920
+ /** @enum {string} */
5921
+ code: "authentication_required";
5922
+ details: Record<string, never>;
5923
+ /** @enum {string} */
5924
+ message: "Authentication is required.";
5925
+ requestId: string;
5926
+ };
5927
+ };
5928
+ };
5929
+ };
5930
+ /** @description The item does not permit this permission operation, or the organization turned external sharing off (reason external_sharing_disabled). */
5931
+ 403: {
5932
+ headers: {
5933
+ [name: string]: unknown;
5934
+ };
5935
+ content: {
5936
+ "application/json": {
5937
+ error: {
5938
+ /** @enum {string} */
5939
+ code: "permission_denied";
5940
+ details: Record<string, never>;
5941
+ /** @enum {string} */
5942
+ message: "The requested action is not permitted.";
5943
+ requestId: string;
5944
+ };
5945
+ } | {
5946
+ error: {
5947
+ /** @enum {string} */
5948
+ code: "permission_denied";
5949
+ details: {
5950
+ /** @enum {string} */
5951
+ reason: "external_sharing_disabled";
5952
+ };
5953
+ /** @enum {string} */
5954
+ message: "The requested action is not permitted.";
5955
+ requestId: string;
5956
+ };
5957
+ };
5958
+ };
5959
+ };
5960
+ /** @description The item is unavailable. */
5961
+ 404: {
5962
+ headers: {
5963
+ [name: string]: unknown;
5964
+ };
5965
+ content?: never;
5966
+ };
5967
+ /** @description The idempotency key conflicts, or the whole batch exceeds a permanent workspace sharing limit and nothing was written. A sharing limit reason is nonretryable for this request; a smaller batch may still fit. */
5968
+ 409: {
5969
+ headers: {
5970
+ [name: string]: unknown;
5971
+ };
5972
+ content: {
5973
+ "application/json": {
5974
+ error: {
5975
+ /** @enum {string} */
5976
+ code: "idempotency_conflict";
5977
+ details: Record<string, never>;
5978
+ /** @enum {string} */
5979
+ message: "The idempotency key conflicts with an earlier request.";
5980
+ requestId: string;
5981
+ };
5982
+ } | {
5983
+ error: {
5984
+ /** @enum {string} */
5985
+ code: "precondition_failed";
5986
+ details: {
5987
+ /** @enum {string} */
5988
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
5989
+ };
5990
+ /** @enum {string} */
5991
+ message: "The request precondition failed.";
5992
+ requestId: string;
5993
+ };
5994
+ };
5995
+ };
5996
+ };
5997
+ /** @description The supplied revision or post-preflight authority is stale. */
5998
+ 412: {
5999
+ headers: {
6000
+ [name: string]: unknown;
6001
+ };
6002
+ content: {
6003
+ "application/json": {
6004
+ error: {
6005
+ /** @enum {string} */
6006
+ code: "precondition_failed";
6007
+ details: Record<string, never>;
6008
+ /** @enum {string} */
6009
+ message: "The request precondition failed.";
6010
+ requestId: string;
6011
+ };
6012
+ };
6013
+ };
6014
+ };
6015
+ /** @description The path, query, headers, idempotency key, or body are invalid. */
6016
+ 422: {
6017
+ headers: {
6018
+ [name: string]: unknown;
6019
+ };
6020
+ content: {
6021
+ "application/json": {
6022
+ error: {
6023
+ /** @enum {string} */
6024
+ code: "invalid_request";
6025
+ details: Record<string, never>;
6026
+ /** @enum {string} */
6027
+ message: "The request is invalid.";
6028
+ requestId: string;
6029
+ };
6030
+ } | {
6031
+ error: {
6032
+ /** @enum {string} */
6033
+ code: "invalid_idempotency_key";
6034
+ details: Record<string, never>;
6035
+ /** @enum {string} */
6036
+ message: "The idempotency key is invalid.";
6037
+ requestId: string;
6038
+ };
6039
+ };
6040
+ };
6041
+ };
6042
+ /** @description Recipient resolution rate limit exceeded; nothing was written. */
6043
+ 429: {
6044
+ headers: {
6045
+ [name: string]: unknown;
6046
+ };
6047
+ content?: never;
6048
+ };
6049
+ /** @description Identity, D1, authorization, audit, cursor, or capacity authority is unavailable. */
6050
+ 503: {
6051
+ headers: {
6052
+ [name: string]: unknown;
6053
+ };
6054
+ content: {
6055
+ "application/json": {
6056
+ error: {
6057
+ /** @enum {string} */
6058
+ code: "identity_authority_unavailable";
6059
+ details: Record<string, never>;
6060
+ /** @enum {string} */
6061
+ message: "Authentication is temporarily unavailable.";
6062
+ requestId: string;
6063
+ };
6064
+ } | {
6065
+ error: {
6066
+ /** @enum {string} */
6067
+ code: "service_unavailable";
6068
+ details: Record<string, never>;
6069
+ /** @enum {string} */
6070
+ message: "The service is temporarily unavailable.";
6071
+ requestId: string;
6072
+ };
6073
+ };
6074
+ };
6075
+ };
6076
+ };
6077
+ };
5673
6078
  listItemSharingPeople: {
5674
6079
  parameters: {
5675
6080
  query?: {
@@ -5772,7 +6177,7 @@ interface operations {
5772
6177
  };
5773
6178
  content?: never;
5774
6179
  };
5775
- /** @description The idempotency key was reused for a different semantic request. */
6180
+ /** @description The idempotency key conflicts, or a permanent workspace sharing limit was reached. Sharing limit reasons are nonretryable. */
5776
6181
  409: {
5777
6182
  headers: {
5778
6183
  [name: string]: unknown;
@@ -5787,6 +6192,18 @@ interface operations {
5787
6192
  message: "The idempotency key conflicts with an earlier request.";
5788
6193
  requestId: string;
5789
6194
  };
6195
+ } | {
6196
+ error: {
6197
+ /** @enum {string} */
6198
+ code: "precondition_failed";
6199
+ details: {
6200
+ /** @enum {string} */
6201
+ reason: "sharing_grant_limit_reached" | "sharing_history_limit_reached";
6202
+ };
6203
+ /** @enum {string} */
6204
+ message: "The request precondition failed.";
6205
+ requestId: string;
6206
+ };
5790
6207
  };
5791
6208
  };
5792
6209
  };
@@ -7736,6 +8153,7 @@ interface DriveEditingClientConfig {
7736
8153
  readonly audience: string;
7737
8154
  readonly fetch?: typeof globalThis.fetch;
7738
8155
  readonly timeoutMilliseconds?: number;
8156
+ readonly upload?: DriveUploadConfig;
7739
8157
  }
7740
8158
  type DriveEditingServerClient = VerifiedTransferOperations & Pick<DriveOperations, "getFileAccessContext" | "createDownload" | "downloadItem">;
7741
8159
  type DriveEditingClient = DriveEditingServerClient & {
@@ -7787,6 +8205,45 @@ type RegisterItemRecipientInput = {
7787
8205
  readonly userId: string;
7788
8206
  readonly email?: never;
7789
8207
  });
8208
+ type ItemRecipientBatchEntry = {
8209
+ /** Assert the freshly resolved Auth identity before this recipient's grant is created. */
8210
+ readonly expectedRecipientUserId?: string;
8211
+ readonly role: "viewer" | "editor";
8212
+ } & ({
8213
+ readonly email: string;
8214
+ readonly userId?: never;
8215
+ } | {
8216
+ readonly userId: string;
8217
+ readonly email?: never;
8218
+ });
8219
+ type RegisterItemRecipientsInput = {
8220
+ readonly workspaceId: string;
8221
+ readonly itemId: string;
8222
+ /** One to 15 distinct recipients; results keep this order. */
8223
+ readonly recipients: readonly ItemRecipientBatchEntry[];
8224
+ readonly ifMatch: string;
8225
+ readonly idempotencyKey: string;
8226
+ readonly signal?: AbortSignal;
8227
+ };
8228
+ type ItemSharingBatchResult = Readonly<{
8229
+ outcome: "added";
8230
+ /** True when an exact retry returns the grant this batch created earlier. */
8231
+ replayed: boolean;
8232
+ grant: PermissionMutation["grant"];
8233
+ grantEtag: string | null;
8234
+ }> | Readonly<{
8235
+ outcome: "already_present";
8236
+ grant: PermissionMutation["grant"];
8237
+ grantEtag: string | null;
8238
+ }> | Readonly<{
8239
+ outcome: "refused";
8240
+ reason: "recipient_unavailable" | "registration_conflict" | "duplicate_recipient";
8241
+ }>;
8242
+ type ItemSharingBatch = Readonly<{
8243
+ collectionRevision: number;
8244
+ collectionEtag: string;
8245
+ results: readonly ItemSharingBatchResult[];
8246
+ }>;
7790
8247
  type ListItemSharingPeopleInput = ListItemPermissionsInput;
7791
8248
  type GeneratedIncomingItemPage = JsonResponse<"listIncomingItems", 200>;
7792
8249
  type IncomingItemMetadata = Readonly<GeneratedIncomingItemPage["items"][number]>;
@@ -7970,7 +8427,40 @@ interface DriveClientConfig {
7970
8427
  readonly baseUrl: string;
7971
8428
  readonly fetch?: typeof globalThis.fetch;
7972
8429
  readonly getCredential: DriveCredentialProvider;
8430
+ /**
8431
+ * Deadline for every API request, 1 ms through 120 s, default 30 s. Setting it explicitly also keeps its earlier
8432
+ * meaning for the object upload: it caps the whole provider PUT unless `upload.maxDurationMilliseconds` is set.
8433
+ */
7973
8434
  readonly timeoutMilliseconds?: number;
8435
+ readonly upload?: DriveUploadConfig;
8436
+ }
8437
+ /**
8438
+ * Bounds and transport for the direct provider PUT behind `uploadVerifiedFile`.
8439
+ *
8440
+ * Progress and stall detection need a transport that reports bytes sent. Without a custom `fetch`, browsers and
8441
+ * webviews use `XMLHttpRequest` for a cross-origin provider PUT; other runtimes, and any custom `fetch` that is not
8442
+ * wrapped with `createUploadProgressFetch`, use plain `fetch`. Plain `fetch` reports only 0 and then all bytes and is
8443
+ * not stall-checked.
8444
+ */
8445
+ interface DriveUploadConfig {
8446
+ /**
8447
+ * Abort the provider PUT when no new byte has been sent for this many milliseconds, or when the response does not
8448
+ * follow the last byte within the same window. Default 30 000, range 1 through 3 600 000. It applies only when the
8449
+ * transport reports progress.
8450
+ */
8451
+ readonly stallTimeoutMilliseconds?: number;
8452
+ /**
8453
+ * Overall cap on the provider PUT, range 1 through 3 600 000. Without it the PUT is bounded only by stall detection
8454
+ * and the capability expiry, unless `timeoutMilliseconds` was set explicitly, which then applies as this cap. The
8455
+ * expiry always applies and is at most five minutes after admission.
8456
+ */
8457
+ readonly maxDurationMilliseconds?: number;
8458
+ /**
8459
+ * `auto` (default) selects a progress-reporting transport when the runtime offers one and no custom `fetch` is
8460
+ * configured. `fetch` always uses `fetch` with coarse progress and no stall detection, which also keeps `fetch`'s
8461
+ * `redirect: "manual"`, `referrerPolicy: "no-referrer"` and `credentials: "omit"` guarantees.
8462
+ */
8463
+ readonly transport?: "auto" | "fetch";
7974
8464
  }
7975
8465
  interface DriveServerClientConfig {
7976
8466
  readonly baseUrl: string;
@@ -8055,12 +8545,31 @@ type CreateDownloadInput = Readonly<CreateDownloadPath> & Readonly<CreateDownloa
8055
8545
  };
8056
8546
  type DownloadItemResult = Response | DriveOperationResult<ManagedDownloadRestorePending, 202> | DriveOperationResult<undefined, 304>;
8057
8547
  type UploadFilePhase = "preparing" | "uploading" | "completing" | "verifying";
8548
+ /**
8549
+ * The step within an upload `phase`, in the order `hashing`, `preparing`, `uploading`, `completing`.
8550
+ * `hashing` and `preparing` both report phase `preparing`. A published replay never uploads and a file of at most
8551
+ * 1 MiB has no separate `preparing` request, so either may skip a stage; a stage never repeats or goes back.
8552
+ */
8553
+ type UploadFileStage = "hashing" | "preparing" | "uploading" | "completing";
8058
8554
  interface UploadFileProgress {
8059
8555
  readonly phase: UploadFilePhase;
8556
+ /**
8557
+ * 0 while `preparing`, `sentByteLength` while `uploading` and `totalByteLength` once `completing`. While uploading it
8558
+ * counts bytes the transport has sent, which the service has not accepted yet; only `published` confirms the file.
8559
+ */
8060
8560
  readonly confirmedByteLength: number;
8061
8561
  readonly totalByteLength: number;
8062
8562
  readonly confirmedPartCount: number;
8063
8563
  readonly totalPartCount: number;
8564
+ /** Present from SDK 0.29. The finer step within `phase`. */
8565
+ readonly stage?: UploadFileStage;
8566
+ /** Present from SDK 0.29. Bytes hashed so far; `totalByteLength` from the end of `hashing` on. */
8567
+ readonly hashedByteLength?: number;
8568
+ /**
8569
+ * Present from SDK 0.29. Bytes the transport has sent to storage so far. With a progress-reporting transport it rises
8570
+ * between 0 and `totalByteLength` while `uploading`; otherwise it jumps from 0 to `totalByteLength` at `completing`.
8571
+ */
8572
+ readonly sentByteLength?: number;
8064
8573
  }
8065
8574
  type UploadFileProgressCallback = (progress: UploadFileProgress) => void;
8066
8575
  interface GetCurrentWorkspaceInput {
@@ -8077,6 +8586,8 @@ interface DriveOperations {
8077
8586
  listVisitorGrants(input: GetItemInput): Promise<DriveOperationResult<VisitorGrantPage, 200>>;
8078
8587
  revokeVisitorGrant(input: RevokeVisitorGrantInput): Promise<DriveOperationResult<VisitorGrant, 200>>;
8079
8588
  registerItemRecipient(input: RegisterItemRecipientInput): Promise<DriveOperationResult<PermissionMutation, 200 | 201>>;
8589
+ /** Shares one item with up to 15 registered recipients under one collection precondition and atomic commit. */
8590
+ registerItemRecipients(input: RegisterItemRecipientsInput): Promise<DriveOperationResult<ItemSharingBatch, 200 | 201>>;
8080
8591
  listItemSharingPeople(input: ListItemSharingPeopleInput): Promise<DriveOperationResult<ItemSharingPeoplePage, 200>>;
8081
8592
  listIncomingShares(input?: ListIncomingSharesInput): Promise<DriveOperationResult<IncomingSharePage, 200>>;
8082
8593
  listIncomingItems(input?: ListIncomingItemsInput): Promise<DriveOperationResult<IncomingItemPage, 200>>;
@@ -8167,4 +8678,4 @@ interface DriveClient extends DriveOperations, VerifiedTransferOperations {
8167
8678
  uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
8168
8679
  }
8169
8680
  //#endregion
8170
- export { ListIncomingItemsInput as $, VisitorGrantCreation as $t, DriveVisitorClient as A, RegisterItemRecipientInput as At, FolderPage as B, UpdateItemPermissionInput as Bt, DriveEditingClientConfig as C, PrepareVerifiedTransferInput as Ct, DriveResponseValidators as D, PublishedVerifiedTransfer as Dt, DriveOperations as E, PublishVerifiedTransferInput as Et, EffectivePermissionResponse as F, RevokeVisitorGrantInput as Ft, GetWorkspaceUsageInput as G, UploadSmallVerifiedFileInput as Gt, GetItemInput as H, UploadFilePhase as Ht, FileAccessContext as I, SearchWorkspaceItemsInput as It, IncomingShareContext as J, VisitorChildren as Jt, IncomingItemMetadata as K, UploadVerifiedFileInput as Kt, FolderItem as L, TransferItemOwnershipInput as Lt, EditingSession as M, RestoreItemInput as Mt, EditingSessionCreation as N, RestoreItemVersionInput as Nt, DriveServerClient as O, ReadEffectiveItemPermissionsInput as Ot, EffectivePermissionAction as P, RevokeItemPermissionInput as Pt, ListFolderChildrenInput as Q, VisitorGrant as Qt, FolderListInclude as R, TrashItemInput as Rt, DriveEditingClient as S, PermissionPage as St, DriveOperationResult as T, ProtectionClassification as Tt, GetItemVersionInput as U, UploadFileProgress as Ut, GetCurrentWorkspaceInput as V, UpdateWorkspaceSharingPolicyInput as Vt, GetVisitorGrantInput as W, UploadFileProgressCallback as Wt, ItemOwnershipTransfer as X, VisitorDownloadInput as Xt, IncomingSharePage as Y, VisitorChildrenInput as Yt, ItemSharingPeoplePage as Z, VisitorEditingSession as Zt, DownloadItemResult as _, OwnedItemPage as _t, CollectOwnedItemsInput as a, WorkspaceDiscoveryPage as an, ListWorkspaceItemsInput as at, DriveCredentialContext as b, PermissionGrantee as bt, CreateEditingSessionInput as c, WorkspaceSharingPolicy as cn, ManagedItemMetadata as ct, CreateVisitorEditingSessionInput as d, ManagedItemVersionResource as dt, VisitorGrantPage as en, ListIncomingSharesInput as et, CreateVisitorGrantInput as f, ManagedItemVersionRestoreResult as ft, DeleteItemInput as g, OwnedItem as gt, CurrentWorkspaceSources as h, OrganizationMemberStorageUsageInput as ht, ChangeEditingSessionInput as i, WorkspaceDiscoveryItem as in, ListOwnedItemsInput as it, DriveVisitorClientConfig as j, RegisteredRecipientDisplay as jt, DriveServerClientConfig as k, RecoverVerifiedTransferInput as kt, CreateFolderInput as l, WorkspaceUsage as ln, ManagedItemVersion as lt, CurrentWorkspace as m, OrganizationMemberStorageUsage as mt, ArchiveItemInput as n, VisitorReadInput as nn, ListItemSharingPeopleInput as nt, CollectedOwnedItems as o, WorkspaceItemSearchItem as on, ManagedDownloadDescriptor as ot, CurrentUserWorkspaceUsage as p, ManagedLifecycleItem as pt, IncomingItemPage as q, VerifiedTransferOperations as qt, ArchivedItem as r, VisitorSession as rn, ListItemVersionsInput as rt, CreateDownloadInput as s, WorkspaceItemSearchPage as sn, ManagedDownloadRestorePending as st, AdmittedVerifiedTransfer as t, VisitorItem as tn, ListItemPermissionsInput as tt, CreateItemPermissionInput as u, operations as un, ManagedItemVersionPage as ut, DriveClient as v, PermissionAction as vt, DriveEditingServerClient as w, PreparedVerifiedTransfer as wt, DriveCredentialProvider as x, PermissionMutation as xt, DriveClientConfig as y, PermissionGrant as yt, FolderListedItem as z, UpdateItemInput as zt };
8681
+ export { ItemSharingBatch as $, VerifiedTransferOperations as $t, DriveUploadConfig as A, PublishVerifiedTransferInput as At, FolderListedItem as B, RevokeVisitorGrantInput as Bt, DriveEditingClientConfig as C, PermissionGrant as Ct, DriveResponseValidators as D, PrepareVerifiedTransferInput as Dt, DriveOperations as E, PermissionPage as Et, EffectivePermissionAction as F, RegisterItemRecipientsInput as Ft, GetVisitorGrantInput as G, UpdateItemPermissionInput as Gt, GetCurrentWorkspaceInput as H, TransferItemOwnershipInput as Ht, EffectivePermissionResponse as I, RegisteredRecipientDisplay as It, IncomingItemPage as J, UploadFileProgress as Jt, GetWorkspaceUsageInput as K, UpdateWorkspaceSharingPolicyInput as Kt, FileAccessContext as L, RestoreItemInput as Lt, DriveVisitorClientConfig as M, ReadEffectiveItemPermissionsInput as Mt, EditingSession as N, RecoverVerifiedTransferInput as Nt, DriveServerClient as O, PreparedVerifiedTransfer as Ot, EditingSessionCreation as P, RegisterItemRecipientInput as Pt, ItemRecipientBatchEntry as Q, UploadVerifiedFileInput as Qt, FolderItem as R, RestoreItemVersionInput as Rt, DriveEditingClient as S, PermissionAction as St, DriveOperationResult as T, PermissionMutation as Tt, GetItemInput as U, TrashItemInput as Ut, FolderPage as V, SearchWorkspaceItemsInput as Vt, GetItemVersionInput as W, UpdateItemInput as Wt, IncomingSharePage as X, UploadFileStage as Xt, IncomingShareContext as Y, UploadFileProgressCallback as Yt, ItemOwnershipTransfer as Z, UploadSmallVerifiedFileInput as Zt, DownloadItemResult as _, ManagedLifecycleItem as _t, CollectOwnedItemsInput as a, VisitorGrantCreation as an, ListItemPermissionsInput as at, DriveCredentialContext as b, OwnedItem as bt, CreateEditingSessionInput as c, VisitorReadInput as cn, ListOwnedItemsInput as ct, CreateVisitorEditingSessionInput as d, WorkspaceDiscoveryPage as dn, ManagedDownloadRestorePending as dt, VisitorChildren as en, ItemSharingBatchResult as et, CreateVisitorGrantInput as f, WorkspaceItemSearchItem as fn, ManagedItemMetadata as ft, DeleteItemInput as g, operations as gn, ManagedItemVersionRestoreResult as gt, CurrentWorkspaceSources as h, WorkspaceUsage as hn, ManagedItemVersionResource as ht, ChangeEditingSessionInput as i, VisitorGrant as in, ListIncomingSharesInput as it, DriveVisitorClient as j, PublishedVerifiedTransfer as jt, DriveServerClientConfig as k, ProtectionClassification as kt, CreateFolderInput as l, VisitorSession as ln, ListWorkspaceItemsInput as lt, CurrentWorkspace as m, WorkspaceSharingPolicy as mn, ManagedItemVersionPage as mt, ArchiveItemInput as n, VisitorDownloadInput as nn, ListFolderChildrenInput as nt, CollectedOwnedItems as o, VisitorGrantPage as on, ListItemSharingPeopleInput as ot, CurrentUserWorkspaceUsage as p, WorkspaceItemSearchPage as pn, ManagedItemVersion as pt, IncomingItemMetadata as q, UploadFilePhase as qt, ArchivedItem as r, VisitorEditingSession as rn, ListIncomingItemsInput as rt, CreateDownloadInput as s, VisitorItem as sn, ListItemVersionsInput as st, AdmittedVerifiedTransfer as t, VisitorChildrenInput as tn, ItemSharingPeoplePage as tt, CreateItemPermissionInput as u, WorkspaceDiscoveryItem as un, ManagedDownloadDescriptor as ut, DriveClient as v, OrganizationMemberStorageUsage as vt, DriveEditingServerClient as w, PermissionGrantee as wt, DriveCredentialProvider as x, OwnedItemPage as xt, DriveClientConfig as y, OrganizationMemberStorageUsageInput as yt, FolderListInclude as z, RevokeItemPermissionInput as zt };