@finueva/drive 0.29.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.
- package/CHANGELOG.md +13 -0
- package/README.md +1 -0
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/contract.d.ts +466 -8
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
package/dist/contract.d.ts
CHANGED
|
@@ -4133,7 +4133,7 @@ interface operations {
|
|
|
4133
4133
|
};
|
|
4134
4134
|
};
|
|
4135
4135
|
};
|
|
4136
|
-
/** @description The idempotency key was
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
};
|
|
@@ -7788,6 +8205,45 @@ type RegisterItemRecipientInput = {
|
|
|
7788
8205
|
readonly userId: string;
|
|
7789
8206
|
readonly email?: never;
|
|
7790
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
|
+
}>;
|
|
7791
8247
|
type ListItemSharingPeopleInput = ListItemPermissionsInput;
|
|
7792
8248
|
type GeneratedIncomingItemPage = JsonResponse<"listIncomingItems", 200>;
|
|
7793
8249
|
type IncomingItemMetadata = Readonly<GeneratedIncomingItemPage["items"][number]>;
|
|
@@ -8130,6 +8586,8 @@ interface DriveOperations {
|
|
|
8130
8586
|
listVisitorGrants(input: GetItemInput): Promise<DriveOperationResult<VisitorGrantPage, 200>>;
|
|
8131
8587
|
revokeVisitorGrant(input: RevokeVisitorGrantInput): Promise<DriveOperationResult<VisitorGrant, 200>>;
|
|
8132
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>>;
|
|
8133
8591
|
listItemSharingPeople(input: ListItemSharingPeopleInput): Promise<DriveOperationResult<ItemSharingPeoplePage, 200>>;
|
|
8134
8592
|
listIncomingShares(input?: ListIncomingSharesInput): Promise<DriveOperationResult<IncomingSharePage, 200>>;
|
|
8135
8593
|
listIncomingItems(input?: ListIncomingItemsInput): Promise<DriveOperationResult<IncomingItemPage, 200>>;
|
|
@@ -8220,4 +8678,4 @@ interface DriveClient extends DriveOperations, VerifiedTransferOperations {
|
|
|
8220
8678
|
uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
|
|
8221
8679
|
}
|
|
8222
8680
|
//#endregion
|
|
8223
|
-
export {
|
|
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 };
|
package/dist/core.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type DriveErrorCode = DriveApiErrorCode | DriveSdkErrorCode;
|
|
|
9
9
|
* A reason narrows an operational refusal the caller can act on. It never carries record identifiers,
|
|
10
10
|
* counts, or state outside the caller's own workspace, and an unknown value is never surfaced.
|
|
11
11
|
*/
|
|
12
|
-
declare const DRIVE_API_ERROR_REASONS: readonly ["upload_admission_saturated", "upload_admission_stalled", "ownership_unchanged", "ownership_successor_not_member", "ownership_restricted_items", "ownership_subtree_too_large", "external_sharing_disabled", "transfer_operation_retired", "transfer_operation_expired", "transfer_operation_clock_skew", "unspecified"];
|
|
12
|
+
declare const DRIVE_API_ERROR_REASONS: readonly ["upload_admission_saturated", "upload_admission_stalled", "ownership_unchanged", "ownership_successor_not_member", "ownership_restricted_items", "ownership_subtree_too_large", "external_sharing_disabled", "transfer_operation_retired", "transfer_operation_expired", "transfer_operation_clock_skew", "sharing_grant_limit_reached", "sharing_history_limit_reached", "unspecified"];
|
|
13
13
|
type DriveErrorReason = (typeof DRIVE_API_ERROR_REASONS)[number];
|
|
14
14
|
type DriveErrorDetails = Readonly<{
|
|
15
15
|
reason?: DriveErrorReason;
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Object.freeze([`authentication_required`,`identity_authority_unavailable`,`recipient_unavailable`,`registration_conflict`,`rate_limited`,`permission_denied`,`resource_not_found`,`invalid_request`,`invalid_pagination_cursor`,`invalid_idempotency_key`,`precondition_failed`,`range_not_satisfiable`,`idempotency_conflict`,`quota_exceeded`,`upload_recovery_required`,`service_unavailable`,`internal_error`]),t=Object.freeze([`upload_admission_saturated`,`upload_admission_stalled`,`ownership_unchanged`,`ownership_successor_not_member`,`ownership_restricted_items`,`ownership_subtree_too_large`,`external_sharing_disabled`,`transfer_operation_retired`,`transfer_operation_expired`,`transfer_operation_clock_skew`,`unspecified`]);function n(e){return typeof e==`string`&&t.includes(e)}const r=Object.freeze({authentication_required:`Authentication is required.`,identity_authority_unavailable:`Authentication is temporarily unavailable.`,recipient_unavailable:`The recipient is unavailable.`,registration_conflict:`The recipient could not be confirmed.`,rate_limited:`Too many requests.`,permission_denied:`The requested action is not permitted.`,resource_not_found:`The requested resource was not found.`,invalid_request:`The request is invalid.`,invalid_pagination_cursor:`The pagination cursor is invalid.`,invalid_idempotency_key:`The idempotency key is invalid.`,precondition_failed:`The request precondition failed.`,range_not_satisfiable:`The requested byte range is not satisfiable.`,idempotency_conflict:`The idempotency key conflicts with an earlier request.`,quota_exceeded:`The workspace storage quota would be exceeded.`,upload_recovery_required:`The upload requires recovery before it can continue.`,service_unavailable:`The service is temporarily unavailable.`,internal_error:`The request could not be completed.`}),i=Object.freeze({invalid_input:`The Drive SDK input is invalid.`,credential_unavailable:`A Drive credential could not be obtained.`,network_error:`The Drive request could not reach the service.`,timeout:`The Drive request timed out.`,aborted:`The Drive request was aborted.`,invalid_response:`Drive returned an invalid response.`});var a=class extends Error{code;status;requestId;details;constructor(e,t={}){super(e in r?r[e]:i[e]),this.name=`DriveError`,this.code=e,this.status=t.status??null,this.requestId=t.requestId??null,this.details=Object.freeze(n(t.reason)?{reason:t.reason}:{})}};export{e as DRIVE_API_ERROR_CODES,r as DRIVE_API_ERROR_MESSAGES,t as DRIVE_API_ERROR_REASONS,a as DriveError,n as isDriveErrorReason};
|
|
1
|
+
const e=Object.freeze([`authentication_required`,`identity_authority_unavailable`,`recipient_unavailable`,`registration_conflict`,`rate_limited`,`permission_denied`,`resource_not_found`,`invalid_request`,`invalid_pagination_cursor`,`invalid_idempotency_key`,`precondition_failed`,`range_not_satisfiable`,`idempotency_conflict`,`quota_exceeded`,`upload_recovery_required`,`service_unavailable`,`internal_error`]),t=Object.freeze([`upload_admission_saturated`,`upload_admission_stalled`,`ownership_unchanged`,`ownership_successor_not_member`,`ownership_restricted_items`,`ownership_subtree_too_large`,`external_sharing_disabled`,`transfer_operation_retired`,`transfer_operation_expired`,`transfer_operation_clock_skew`,`sharing_grant_limit_reached`,`sharing_history_limit_reached`,`unspecified`]);function n(e){return typeof e==`string`&&t.includes(e)}const r=Object.freeze({authentication_required:`Authentication is required.`,identity_authority_unavailable:`Authentication is temporarily unavailable.`,recipient_unavailable:`The recipient is unavailable.`,registration_conflict:`The recipient could not be confirmed.`,rate_limited:`Too many requests.`,permission_denied:`The requested action is not permitted.`,resource_not_found:`The requested resource was not found.`,invalid_request:`The request is invalid.`,invalid_pagination_cursor:`The pagination cursor is invalid.`,invalid_idempotency_key:`The idempotency key is invalid.`,precondition_failed:`The request precondition failed.`,range_not_satisfiable:`The requested byte range is not satisfiable.`,idempotency_conflict:`The idempotency key conflicts with an earlier request.`,quota_exceeded:`The workspace storage quota would be exceeded.`,upload_recovery_required:`The upload requires recovery before it can continue.`,service_unavailable:`The service is temporarily unavailable.`,internal_error:`The request could not be completed.`}),i=Object.freeze({invalid_input:`The Drive SDK input is invalid.`,credential_unavailable:`A Drive credential could not be obtained.`,network_error:`The Drive request could not reach the service.`,timeout:`The Drive request timed out.`,aborted:`The Drive request was aborted.`,invalid_response:`Drive returned an invalid response.`});var a=class extends Error{code;status;requestId;details;constructor(e,t={}){super(e in r?r[e]:i[e]),this.name=`DriveError`,this.code=e,this.status=t.status??null,this.requestId=t.requestId??null,this.details=Object.freeze(n(t.reason)?{reason:t.reason}:{})}};export{e as DRIVE_API_ERROR_CODES,r as DRIVE_API_ERROR_MESSAGES,t as DRIVE_API_ERROR_REASONS,a as DriveError,n as isDriveErrorReason};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $t as VerifiedTransferOperations, A as DriveUploadConfig, At as PublishVerifiedTransferInput, B as FolderListedItem, Bt as RevokeVisitorGrantInput, C as DriveEditingClientConfig, Ct as PermissionGrant, D as DriveResponseValidators, Dt as PrepareVerifiedTransferInput, E as DriveOperations, F as EffectivePermissionAction, G as GetVisitorGrantInput, Gt as UpdateItemPermissionInput, H as GetCurrentWorkspaceInput, Ht as TransferItemOwnershipInput, J as IncomingItemPage, Jt as UploadFileProgress, K as GetWorkspaceUsageInput, Kt as UpdateWorkspaceSharingPolicyInput, L as FileAccessContext, Lt as RestoreItemInput, M as DriveVisitorClientConfig, Mt as ReadEffectiveItemPermissionsInput, N as EditingSession, Nt as RecoverVerifiedTransferInput, Ot as PreparedVerifiedTransfer, P as EditingSessionCreation, Qt as UploadVerifiedFileInput, R as FolderItem, Rt as RestoreItemVersionInput, S as DriveEditingClient, St as PermissionAction, T as DriveOperationResult, Tt as PermissionMutation, U as GetItemInput, Ut as TrashItemInput, V as FolderPage, Vt as SearchWorkspaceItemsInput, W as GetItemVersionInput, Wt as UpdateItemInput, Xt as UploadFileStage, Yt as UploadFileProgressCallback, Z as ItemOwnershipTransfer, _ as DownloadItemResult, _t as ManagedLifecycleItem, a as CollectOwnedItemsInput, an as VisitorGrantCreation, at as ListItemPermissionsInput, bt as OwnedItem, c as CreateEditingSessionInput, cn as VisitorReadInput, ct as ListOwnedItemsInput, dn as WorkspaceDiscoveryPage, dt as ManagedDownloadRestorePending, en as VisitorChildren, f as CreateVisitorGrantInput, fn as WorkspaceItemSearchItem, ft as ManagedItemMetadata, g as DeleteItemInput, gt as ManagedItemVersionRestoreResult, h as CurrentWorkspaceSources, hn as WorkspaceUsage, ht as ManagedItemVersionResource, i as ChangeEditingSessionInput, in as VisitorGrant, j as DriveVisitorClient, jt as PublishedVerifiedTransfer, kt as ProtectionClassification, l as CreateFolderInput, ln as VisitorSession, lt as ListWorkspaceItemsInput, m as CurrentWorkspace, mn as WorkspaceSharingPolicy, mt as ManagedItemVersionPage, n as ArchiveItemInput, nn as VisitorDownloadInput, nt as ListFolderChildrenInput, o as CollectedOwnedItems, on as VisitorGrantPage, p as CurrentUserWorkspaceUsage, pn as WorkspaceItemSearchPage, pt as ManagedItemVersion, q as IncomingItemMetadata, qt as UploadFilePhase, r as ArchivedItem, rt as ListIncomingItemsInput, s as CreateDownloadInput, sn as VisitorItem, st as ListItemVersionsInput, t as AdmittedVerifiedTransfer, tn as VisitorChildrenInput, u as CreateItemPermissionInput, un as WorkspaceDiscoveryItem, ut as ManagedDownloadDescriptor, v as DriveClient, wt as PermissionGrantee, x as DriveCredentialProvider, xt as OwnedItemPage, y as DriveClientConfig, z as FolderListInclude, zt as RevokeItemPermissionInput } from "./contract.js";
|
|
2
2
|
import { DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DRIVE_API_ERROR_REASONS, DriveApiErrorCode, DriveError, DriveErrorCode, DriveErrorDetails, DriveErrorReason, DriveSdkErrorCode } from "./core.js";
|
|
3
3
|
import { n as createDriveVisitorClient, r as createVisitorSessionToken, t as collectOwnedItems } from "./contract2.js";
|
|
4
4
|
import { n as createDriveEditingClient, r as createUploadProgressFetch, t as createDriveClient } from "./contract3.js";
|