@finueva/drive 0.13.0 → 0.15.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 +16 -0
- package/README.md +13 -0
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/contract.d.ts +527 -6
- package/dist/contract2.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- 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
|
@@ -228,6 +228,8 @@ interface operations {
|
|
|
228
228
|
query?: {
|
|
229
229
|
limit?: number;
|
|
230
230
|
cursor?: string;
|
|
231
|
+
/** @description Comma-separated exact lowercase media types (1–16 unique values). Filters published current files before pagination. */
|
|
232
|
+
mediaTypes?: string;
|
|
231
233
|
};
|
|
232
234
|
header?: never;
|
|
233
235
|
path?: never;
|
|
@@ -729,6 +731,138 @@ interface operations {
|
|
|
729
731
|
};
|
|
730
732
|
};
|
|
731
733
|
};
|
|
734
|
+
ensureOrganizationWorkspaceAccess: {
|
|
735
|
+
parameters: {
|
|
736
|
+
query?: never;
|
|
737
|
+
header?: never;
|
|
738
|
+
path?: never;
|
|
739
|
+
cookie?: never;
|
|
740
|
+
};
|
|
741
|
+
requestBody?: never;
|
|
742
|
+
responses: {
|
|
743
|
+
/** @description Current workspace is accessible to the verified organization subject. */
|
|
744
|
+
200: {
|
|
745
|
+
headers: {
|
|
746
|
+
[name: string]: unknown;
|
|
747
|
+
};
|
|
748
|
+
content: {
|
|
749
|
+
"application/json": {
|
|
750
|
+
rootItemId: string;
|
|
751
|
+
rootVolumeId: string;
|
|
752
|
+
workspaceId: string;
|
|
753
|
+
workspaceReference: {
|
|
754
|
+
/** @enum {string} */
|
|
755
|
+
type: "personal";
|
|
756
|
+
userId: string;
|
|
757
|
+
} | {
|
|
758
|
+
organizationId: string;
|
|
759
|
+
/** @enum {string} */
|
|
760
|
+
type: "organization";
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
};
|
|
765
|
+
/** @description A valid user credential is required. */
|
|
766
|
+
401: {
|
|
767
|
+
headers: {
|
|
768
|
+
[name: string]: unknown;
|
|
769
|
+
};
|
|
770
|
+
content: {
|
|
771
|
+
"application/json": {
|
|
772
|
+
error: {
|
|
773
|
+
/** @enum {string} */
|
|
774
|
+
code: "authentication_required";
|
|
775
|
+
details: Record<string, never>;
|
|
776
|
+
/** @enum {string} */
|
|
777
|
+
message: "Authentication is required.";
|
|
778
|
+
requestId: string;
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
};
|
|
783
|
+
/** @description Organization context is required or storage is disabled. */
|
|
784
|
+
403: {
|
|
785
|
+
headers: {
|
|
786
|
+
[name: string]: unknown;
|
|
787
|
+
};
|
|
788
|
+
content: {
|
|
789
|
+
"application/json": {
|
|
790
|
+
error: {
|
|
791
|
+
/** @enum {string} */
|
|
792
|
+
code: "permission_denied";
|
|
793
|
+
details: Record<string, never>;
|
|
794
|
+
/** @enum {string} */
|
|
795
|
+
message: "The requested action is not permitted.";
|
|
796
|
+
requestId: string;
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
/** @description The selected workspace is not provisioned. */
|
|
802
|
+
404: {
|
|
803
|
+
headers: {
|
|
804
|
+
[name: string]: unknown;
|
|
805
|
+
};
|
|
806
|
+
content: {
|
|
807
|
+
"application/json": {
|
|
808
|
+
error: {
|
|
809
|
+
/** @enum {string} */
|
|
810
|
+
code: "resource_not_found";
|
|
811
|
+
details: Record<string, never>;
|
|
812
|
+
/** @enum {string} */
|
|
813
|
+
message: "The requested resource was not found.";
|
|
814
|
+
requestId: string;
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
/** @description Body and query input are not accepted. */
|
|
820
|
+
422: {
|
|
821
|
+
headers: {
|
|
822
|
+
[name: string]: unknown;
|
|
823
|
+
};
|
|
824
|
+
content: {
|
|
825
|
+
"application/json": {
|
|
826
|
+
error: {
|
|
827
|
+
/** @enum {string} */
|
|
828
|
+
code: "invalid_request";
|
|
829
|
+
details: Record<string, never>;
|
|
830
|
+
/** @enum {string} */
|
|
831
|
+
message: "The request is invalid.";
|
|
832
|
+
requestId: string;
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
/** @description Authority or canonical storage state is unavailable. */
|
|
838
|
+
503: {
|
|
839
|
+
headers: {
|
|
840
|
+
[name: string]: unknown;
|
|
841
|
+
};
|
|
842
|
+
content: {
|
|
843
|
+
"application/json": {
|
|
844
|
+
error: {
|
|
845
|
+
/** @enum {string} */
|
|
846
|
+
code: "identity_authority_unavailable";
|
|
847
|
+
details: Record<string, never>;
|
|
848
|
+
/** @enum {string} */
|
|
849
|
+
message: "Authentication is temporarily unavailable.";
|
|
850
|
+
requestId: string;
|
|
851
|
+
};
|
|
852
|
+
} | {
|
|
853
|
+
error: {
|
|
854
|
+
/** @enum {string} */
|
|
855
|
+
code: "service_unavailable";
|
|
856
|
+
details: Record<string, never>;
|
|
857
|
+
/** @enum {string} */
|
|
858
|
+
message: "The service is temporarily unavailable.";
|
|
859
|
+
requestId: string;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
};
|
|
732
866
|
getCurrentWorkspaceSources: {
|
|
733
867
|
parameters: {
|
|
734
868
|
query?: never;
|
|
@@ -880,6 +1014,8 @@ interface operations {
|
|
|
880
1014
|
view?: "recent" | "shared" | "trash";
|
|
881
1015
|
kind?: "file" | "folder";
|
|
882
1016
|
creatorUserId?: string;
|
|
1017
|
+
/** @description Comma-separated exact lowercase media types (1–16 unique values). Matches published current file versions, not filename extensions. */
|
|
1018
|
+
mediaTypes?: string;
|
|
883
1019
|
limit?: number;
|
|
884
1020
|
cursor?: string;
|
|
885
1021
|
};
|
|
@@ -1576,6 +1712,74 @@ interface operations {
|
|
|
1576
1712
|
};
|
|
1577
1713
|
};
|
|
1578
1714
|
};
|
|
1715
|
+
getFileAccessContext: {
|
|
1716
|
+
parameters: {
|
|
1717
|
+
query?: never;
|
|
1718
|
+
header?: never;
|
|
1719
|
+
path: {
|
|
1720
|
+
workspaceId: string;
|
|
1721
|
+
itemId: string;
|
|
1722
|
+
};
|
|
1723
|
+
cookie?: never;
|
|
1724
|
+
};
|
|
1725
|
+
requestBody?: never;
|
|
1726
|
+
responses: {
|
|
1727
|
+
/** @description Current file version, generation and access snapshot; not a write credential. */
|
|
1728
|
+
200: {
|
|
1729
|
+
headers: {
|
|
1730
|
+
[name: string]: unknown;
|
|
1731
|
+
};
|
|
1732
|
+
content: {
|
|
1733
|
+
"application/json": {
|
|
1734
|
+
canRead: boolean;
|
|
1735
|
+
canWrite: boolean;
|
|
1736
|
+
/** Format: uuid */
|
|
1737
|
+
contentGeneration: string | null;
|
|
1738
|
+
itemId: string;
|
|
1739
|
+
subject: string;
|
|
1740
|
+
validUntil: number;
|
|
1741
|
+
versionId: string;
|
|
1742
|
+
workspaceId: string;
|
|
1743
|
+
};
|
|
1744
|
+
};
|
|
1745
|
+
};
|
|
1746
|
+
/** @description User authentication required. */
|
|
1747
|
+
401: {
|
|
1748
|
+
headers: {
|
|
1749
|
+
[name: string]: unknown;
|
|
1750
|
+
};
|
|
1751
|
+
content?: never;
|
|
1752
|
+
};
|
|
1753
|
+
/** @description File unavailable. */
|
|
1754
|
+
404: {
|
|
1755
|
+
headers: {
|
|
1756
|
+
[name: string]: unknown;
|
|
1757
|
+
};
|
|
1758
|
+
content?: never;
|
|
1759
|
+
};
|
|
1760
|
+
/** @description Authority changed. */
|
|
1761
|
+
409: {
|
|
1762
|
+
headers: {
|
|
1763
|
+
[name: string]: unknown;
|
|
1764
|
+
};
|
|
1765
|
+
content?: never;
|
|
1766
|
+
};
|
|
1767
|
+
/** @description Invalid request. */
|
|
1768
|
+
422: {
|
|
1769
|
+
headers: {
|
|
1770
|
+
[name: string]: unknown;
|
|
1771
|
+
};
|
|
1772
|
+
content?: never;
|
|
1773
|
+
};
|
|
1774
|
+
/** @description Authority unavailable. */
|
|
1775
|
+
503: {
|
|
1776
|
+
headers: {
|
|
1777
|
+
[name: string]: unknown;
|
|
1778
|
+
};
|
|
1779
|
+
content?: never;
|
|
1780
|
+
};
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1579
1783
|
listFolderChildren: {
|
|
1580
1784
|
parameters: {
|
|
1581
1785
|
query?: {
|
|
@@ -3965,6 +4169,150 @@ interface operations {
|
|
|
3965
4169
|
};
|
|
3966
4170
|
};
|
|
3967
4171
|
};
|
|
4172
|
+
createFileVersionUpload: {
|
|
4173
|
+
parameters: {
|
|
4174
|
+
query?: never;
|
|
4175
|
+
header: {
|
|
4176
|
+
"Idempotency-Key": string;
|
|
4177
|
+
"If-Match": string;
|
|
4178
|
+
};
|
|
4179
|
+
path: {
|
|
4180
|
+
workspaceId: string;
|
|
4181
|
+
itemId: string;
|
|
4182
|
+
};
|
|
4183
|
+
cookie?: never;
|
|
4184
|
+
};
|
|
4185
|
+
requestBody: {
|
|
4186
|
+
content: {
|
|
4187
|
+
"application/json": {
|
|
4188
|
+
byteLength: number;
|
|
4189
|
+
contentMd5?: string;
|
|
4190
|
+
digest: string;
|
|
4191
|
+
expectedVersionId: string;
|
|
4192
|
+
};
|
|
4193
|
+
};
|
|
4194
|
+
};
|
|
4195
|
+
responses: {
|
|
4196
|
+
/** @description Exact replay of the admitted checkpoint upload. */
|
|
4197
|
+
200: {
|
|
4198
|
+
headers: {
|
|
4199
|
+
[name: string]: unknown;
|
|
4200
|
+
};
|
|
4201
|
+
content: {
|
|
4202
|
+
"application/json": {
|
|
4203
|
+
expiresAtEpochMilliseconds: number;
|
|
4204
|
+
itemId: string;
|
|
4205
|
+
/** @enum {string} */
|
|
4206
|
+
mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
|
|
4207
|
+
/** @enum {number} */
|
|
4208
|
+
partByteLength: 33554432;
|
|
4209
|
+
partCount: number;
|
|
4210
|
+
revision: number;
|
|
4211
|
+
singleUpload?: {
|
|
4212
|
+
descriptor: {
|
|
4213
|
+
expectedByteLength: number;
|
|
4214
|
+
expiresAtEpochMilliseconds: number;
|
|
4215
|
+
headers: {
|
|
4216
|
+
"content-md5": string;
|
|
4217
|
+
"content-type": string;
|
|
4218
|
+
/** @enum {string} */
|
|
4219
|
+
"if-none-match": "*";
|
|
4220
|
+
};
|
|
4221
|
+
/** @enum {string} */
|
|
4222
|
+
method: "PUT";
|
|
4223
|
+
/** Format: uri */
|
|
4224
|
+
url: string;
|
|
4225
|
+
} | null;
|
|
4226
|
+
/** @enum {string} */
|
|
4227
|
+
state: "uploading" | "completing" | "ready";
|
|
4228
|
+
};
|
|
4229
|
+
uploadId: string;
|
|
4230
|
+
versionId: string;
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
};
|
|
4234
|
+
/** @description New checkpoint upload using ordinary archive multipart operations. */
|
|
4235
|
+
201: {
|
|
4236
|
+
headers: {
|
|
4237
|
+
[name: string]: unknown;
|
|
4238
|
+
};
|
|
4239
|
+
content: {
|
|
4240
|
+
"application/json": {
|
|
4241
|
+
expiresAtEpochMilliseconds: number;
|
|
4242
|
+
itemId: string;
|
|
4243
|
+
/** @enum {string} */
|
|
4244
|
+
mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
|
|
4245
|
+
/** @enum {number} */
|
|
4246
|
+
partByteLength: 33554432;
|
|
4247
|
+
partCount: number;
|
|
4248
|
+
revision: number;
|
|
4249
|
+
singleUpload?: {
|
|
4250
|
+
descriptor: {
|
|
4251
|
+
expectedByteLength: number;
|
|
4252
|
+
expiresAtEpochMilliseconds: number;
|
|
4253
|
+
headers: {
|
|
4254
|
+
"content-md5": string;
|
|
4255
|
+
"content-type": string;
|
|
4256
|
+
/** @enum {string} */
|
|
4257
|
+
"if-none-match": "*";
|
|
4258
|
+
};
|
|
4259
|
+
/** @enum {string} */
|
|
4260
|
+
method: "PUT";
|
|
4261
|
+
/** Format: uri */
|
|
4262
|
+
url: string;
|
|
4263
|
+
} | null;
|
|
4264
|
+
/** @enum {string} */
|
|
4265
|
+
state: "uploading" | "completing" | "ready";
|
|
4266
|
+
};
|
|
4267
|
+
uploadId: string;
|
|
4268
|
+
versionId: string;
|
|
4269
|
+
};
|
|
4270
|
+
};
|
|
4271
|
+
};
|
|
4272
|
+
/** @description Drive user authentication required. */
|
|
4273
|
+
401: {
|
|
4274
|
+
headers: {
|
|
4275
|
+
[name: string]: unknown;
|
|
4276
|
+
};
|
|
4277
|
+
content?: never;
|
|
4278
|
+
};
|
|
4279
|
+
/** @description Current file update permission required. */
|
|
4280
|
+
403: {
|
|
4281
|
+
headers: {
|
|
4282
|
+
[name: string]: unknown;
|
|
4283
|
+
};
|
|
4284
|
+
content?: never;
|
|
4285
|
+
};
|
|
4286
|
+
/** @description File or upload unavailable. */
|
|
4287
|
+
404: {
|
|
4288
|
+
headers: {
|
|
4289
|
+
[name: string]: unknown;
|
|
4290
|
+
};
|
|
4291
|
+
content?: never;
|
|
4292
|
+
};
|
|
4293
|
+
/** @description Expected version, quota or idempotency conflict. */
|
|
4294
|
+
409: {
|
|
4295
|
+
headers: {
|
|
4296
|
+
[name: string]: unknown;
|
|
4297
|
+
};
|
|
4298
|
+
content?: never;
|
|
4299
|
+
};
|
|
4300
|
+
/** @description Invalid conditional version request. */
|
|
4301
|
+
422: {
|
|
4302
|
+
headers: {
|
|
4303
|
+
[name: string]: unknown;
|
|
4304
|
+
};
|
|
4305
|
+
content?: never;
|
|
4306
|
+
};
|
|
4307
|
+
/** @description Archive or persistence unavailable; retain operation identity for retry. */
|
|
4308
|
+
503: {
|
|
4309
|
+
headers: {
|
|
4310
|
+
[name: string]: unknown;
|
|
4311
|
+
};
|
|
4312
|
+
content?: never;
|
|
4313
|
+
};
|
|
4314
|
+
};
|
|
4315
|
+
};
|
|
3968
4316
|
listItemVersions: {
|
|
3969
4317
|
parameters: {
|
|
3970
4318
|
query?: {
|
|
@@ -5021,6 +5369,8 @@ interface operations {
|
|
|
5021
5369
|
"application/json": {
|
|
5022
5370
|
/** @description Caller-declared whole-file SHA-256 metadata; it is not archive verification evidence. */
|
|
5023
5371
|
callerDeclaredContentDigest: string;
|
|
5372
|
+
/** @description Requests a conditional single PUT for a nonempty file up to 8 MiB. */
|
|
5373
|
+
contentMd5?: string;
|
|
5024
5374
|
displayFilename: string;
|
|
5025
5375
|
expectedByteLength: number;
|
|
5026
5376
|
mediaType: string;
|
|
@@ -5041,11 +5391,29 @@ interface operations {
|
|
|
5041
5391
|
expiresAtEpochMilliseconds: number;
|
|
5042
5392
|
itemId: string;
|
|
5043
5393
|
/** @enum {string} */
|
|
5044
|
-
mode: "presigned-multipart" | "server-mediated-zero-byte";
|
|
5394
|
+
mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
|
|
5045
5395
|
/** @enum {number} */
|
|
5046
5396
|
partByteLength: 33554432;
|
|
5047
5397
|
partCount: number;
|
|
5048
5398
|
revision: number;
|
|
5399
|
+
singleUpload?: {
|
|
5400
|
+
descriptor: {
|
|
5401
|
+
expectedByteLength: number;
|
|
5402
|
+
expiresAtEpochMilliseconds: number;
|
|
5403
|
+
headers: {
|
|
5404
|
+
"content-md5": string;
|
|
5405
|
+
"content-type": string;
|
|
5406
|
+
/** @enum {string} */
|
|
5407
|
+
"if-none-match": "*";
|
|
5408
|
+
};
|
|
5409
|
+
/** @enum {string} */
|
|
5410
|
+
method: "PUT";
|
|
5411
|
+
/** Format: uri */
|
|
5412
|
+
url: string;
|
|
5413
|
+
} | null;
|
|
5414
|
+
/** @enum {string} */
|
|
5415
|
+
state: "uploading" | "completing" | "ready";
|
|
5416
|
+
};
|
|
5049
5417
|
uploadId: string;
|
|
5050
5418
|
versionId: string;
|
|
5051
5419
|
};
|
|
@@ -5061,11 +5429,29 @@ interface operations {
|
|
|
5061
5429
|
expiresAtEpochMilliseconds: number;
|
|
5062
5430
|
itemId: string;
|
|
5063
5431
|
/** @enum {string} */
|
|
5064
|
-
mode: "presigned-multipart" | "server-mediated-zero-byte";
|
|
5432
|
+
mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
|
|
5065
5433
|
/** @enum {number} */
|
|
5066
5434
|
partByteLength: 33554432;
|
|
5067
5435
|
partCount: number;
|
|
5068
5436
|
revision: number;
|
|
5437
|
+
singleUpload?: {
|
|
5438
|
+
descriptor: {
|
|
5439
|
+
expectedByteLength: number;
|
|
5440
|
+
expiresAtEpochMilliseconds: number;
|
|
5441
|
+
headers: {
|
|
5442
|
+
"content-md5": string;
|
|
5443
|
+
"content-type": string;
|
|
5444
|
+
/** @enum {string} */
|
|
5445
|
+
"if-none-match": "*";
|
|
5446
|
+
};
|
|
5447
|
+
/** @enum {string} */
|
|
5448
|
+
method: "PUT";
|
|
5449
|
+
/** Format: uri */
|
|
5450
|
+
url: string;
|
|
5451
|
+
} | null;
|
|
5452
|
+
/** @enum {string} */
|
|
5453
|
+
state: "uploading" | "completing" | "ready";
|
|
5454
|
+
};
|
|
5069
5455
|
uploadId: string;
|
|
5070
5456
|
versionId: string;
|
|
5071
5457
|
};
|
|
@@ -5257,7 +5643,7 @@ interface operations {
|
|
|
5257
5643
|
/** @enum {string} */
|
|
5258
5644
|
lifecycle: "initiating" | "recovery-required" | "uploading" | "completing" | "provider-completed" | "verifying" | "failed" | "ready" | "aborting" | "aborted";
|
|
5259
5645
|
/** @enum {string} */
|
|
5260
|
-
mode: "presigned-multipart" | "server-mediated-zero-byte";
|
|
5646
|
+
mode: "presigned-multipart" | "server-mediated-zero-byte" | "presigned-single";
|
|
5261
5647
|
nextAfterPartNumber: number | null;
|
|
5262
5648
|
partPolicy: {
|
|
5263
5649
|
/** @enum {number} */
|
|
@@ -5268,7 +5654,7 @@ interface operations {
|
|
|
5268
5654
|
};
|
|
5269
5655
|
ready: {
|
|
5270
5656
|
byteLength: number;
|
|
5271
|
-
/** @description Caller-declared whole-file SHA-256.
|
|
5657
|
+
/** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
|
|
5272
5658
|
callerDeclaredContentDigest: string;
|
|
5273
5659
|
displayFilename: string;
|
|
5274
5660
|
itemId: string;
|
|
@@ -5561,7 +5947,7 @@ interface operations {
|
|
|
5561
5947
|
content: {
|
|
5562
5948
|
"application/json": {
|
|
5563
5949
|
byteLength: number;
|
|
5564
|
-
/** @description Caller-declared whole-file SHA-256.
|
|
5950
|
+
/** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
|
|
5565
5951
|
callerDeclaredContentDigest: string;
|
|
5566
5952
|
displayFilename: string;
|
|
5567
5953
|
itemId: string;
|
|
@@ -6058,6 +6444,109 @@ interface operations {
|
|
|
6058
6444
|
};
|
|
6059
6445
|
};
|
|
6060
6446
|
};
|
|
6447
|
+
commitFileVersion: {
|
|
6448
|
+
parameters: {
|
|
6449
|
+
query?: never;
|
|
6450
|
+
header: {
|
|
6451
|
+
"Idempotency-Key": string;
|
|
6452
|
+
"If-Match": string;
|
|
6453
|
+
};
|
|
6454
|
+
path: {
|
|
6455
|
+
workspaceId: string;
|
|
6456
|
+
uploadId: string;
|
|
6457
|
+
};
|
|
6458
|
+
cookie?: never;
|
|
6459
|
+
};
|
|
6460
|
+
requestBody: {
|
|
6461
|
+
content: {
|
|
6462
|
+
"application/json": {
|
|
6463
|
+
expectedVersionId: string;
|
|
6464
|
+
};
|
|
6465
|
+
};
|
|
6466
|
+
};
|
|
6467
|
+
responses: {
|
|
6468
|
+
/** @description Archive verified and exact-version checkpoint committed or replayed. */
|
|
6469
|
+
200: {
|
|
6470
|
+
headers: {
|
|
6471
|
+
[name: string]: unknown;
|
|
6472
|
+
};
|
|
6473
|
+
content: {
|
|
6474
|
+
"application/json": {
|
|
6475
|
+
byteLength: number;
|
|
6476
|
+
/** @description Caller-declared whole-file SHA-256. Drive independently verifies archive bytes before publication. */
|
|
6477
|
+
callerDeclaredContentDigest: string;
|
|
6478
|
+
displayFilename: string;
|
|
6479
|
+
itemId: string;
|
|
6480
|
+
mediaType: string;
|
|
6481
|
+
/** @enum {string} */
|
|
6482
|
+
state: "ready";
|
|
6483
|
+
uploadId: string;
|
|
6484
|
+
versionId: string;
|
|
6485
|
+
};
|
|
6486
|
+
};
|
|
6487
|
+
};
|
|
6488
|
+
/** @description Archive hash verification still pending; retain the same operation identity. */
|
|
6489
|
+
202: {
|
|
6490
|
+
headers: {
|
|
6491
|
+
[name: string]: unknown;
|
|
6492
|
+
};
|
|
6493
|
+
content: {
|
|
6494
|
+
"application/json": {
|
|
6495
|
+
itemId: string;
|
|
6496
|
+
/** @enum {string} */
|
|
6497
|
+
state: "verifying";
|
|
6498
|
+
totalByteLength: number;
|
|
6499
|
+
uploadId: string;
|
|
6500
|
+
verificationRevision: number;
|
|
6501
|
+
verifiedByteLength: number;
|
|
6502
|
+
versionId: string;
|
|
6503
|
+
};
|
|
6504
|
+
};
|
|
6505
|
+
};
|
|
6506
|
+
/** @description Drive user authentication required. */
|
|
6507
|
+
401: {
|
|
6508
|
+
headers: {
|
|
6509
|
+
[name: string]: unknown;
|
|
6510
|
+
};
|
|
6511
|
+
content?: never;
|
|
6512
|
+
};
|
|
6513
|
+
/** @description Current file update permission required. */
|
|
6514
|
+
403: {
|
|
6515
|
+
headers: {
|
|
6516
|
+
[name: string]: unknown;
|
|
6517
|
+
};
|
|
6518
|
+
content?: never;
|
|
6519
|
+
};
|
|
6520
|
+
/** @description File or upload unavailable. */
|
|
6521
|
+
404: {
|
|
6522
|
+
headers: {
|
|
6523
|
+
[name: string]: unknown;
|
|
6524
|
+
};
|
|
6525
|
+
content?: never;
|
|
6526
|
+
};
|
|
6527
|
+
/** @description Expected version, quota or idempotency conflict. */
|
|
6528
|
+
409: {
|
|
6529
|
+
headers: {
|
|
6530
|
+
[name: string]: unknown;
|
|
6531
|
+
};
|
|
6532
|
+
content?: never;
|
|
6533
|
+
};
|
|
6534
|
+
/** @description Invalid conditional version request. */
|
|
6535
|
+
422: {
|
|
6536
|
+
headers: {
|
|
6537
|
+
[name: string]: unknown;
|
|
6538
|
+
};
|
|
6539
|
+
content?: never;
|
|
6540
|
+
};
|
|
6541
|
+
/** @description Archive or persistence unavailable; retain operation identity for retry. */
|
|
6542
|
+
503: {
|
|
6543
|
+
headers: {
|
|
6544
|
+
[name: string]: unknown;
|
|
6545
|
+
};
|
|
6546
|
+
content?: never;
|
|
6547
|
+
};
|
|
6548
|
+
};
|
|
6549
|
+
};
|
|
6061
6550
|
getWorkspaceUsage: {
|
|
6062
6551
|
parameters: {
|
|
6063
6552
|
query?: never;
|
|
@@ -6211,6 +6700,20 @@ type JsonRequest<Name extends keyof operations> = operations[Name] extends {
|
|
|
6211
6700
|
};
|
|
6212
6701
|
};
|
|
6213
6702
|
} ? Body : never;
|
|
6703
|
+
type CreateFileVersionUploadInput = Readonly<JsonRequest<"createFileVersionUpload"> & {
|
|
6704
|
+
workspaceId: string;
|
|
6705
|
+
itemId: string;
|
|
6706
|
+
idempotencyKey: string;
|
|
6707
|
+
signal?: AbortSignal;
|
|
6708
|
+
}>;
|
|
6709
|
+
type FileAccessContext = Readonly<JsonResponse<"getFileAccessContext", 200>>;
|
|
6710
|
+
type CommitFileVersionInput = Readonly<JsonRequest<"commitFileVersion"> & {
|
|
6711
|
+
workspaceId: string;
|
|
6712
|
+
itemId: string;
|
|
6713
|
+
uploadId: string;
|
|
6714
|
+
idempotencyKey: string;
|
|
6715
|
+
signal?: AbortSignal;
|
|
6716
|
+
}>;
|
|
6214
6717
|
type ResourcePath = operations["listFolderChildren"]["parameters"]["path"];
|
|
6215
6718
|
type PageQuery = NonNullable<operations["listFolderChildren"]["parameters"]["query"]>;
|
|
6216
6719
|
type SearchWorkspaceItemsPath = operations["searchWorkspaceItems"]["parameters"]["path"];
|
|
@@ -6269,6 +6772,7 @@ type IncomingSharePage = Readonly<{
|
|
|
6269
6772
|
nextCursor: string | null;
|
|
6270
6773
|
}>;
|
|
6271
6774
|
interface ListIncomingSharesInput {
|
|
6775
|
+
readonly mediaTypes?: readonly string[];
|
|
6272
6776
|
readonly limit?: number;
|
|
6273
6777
|
readonly cursor?: string;
|
|
6274
6778
|
readonly signal?: AbortSignal;
|
|
@@ -6290,6 +6794,7 @@ interface GetWorkspaceUsageInput {
|
|
|
6290
6794
|
readonly signal?: AbortSignal;
|
|
6291
6795
|
}
|
|
6292
6796
|
interface ListWorkspaceItemsInput extends GetWorkspaceUsageInput {
|
|
6797
|
+
readonly mediaTypes?: readonly string[];
|
|
6293
6798
|
readonly view?: "recent" | "shared" | "trash";
|
|
6294
6799
|
readonly kind?: "file" | "folder";
|
|
6295
6800
|
readonly creatorUserId?: string;
|
|
@@ -6505,10 +7010,23 @@ interface UploadFileInput {
|
|
|
6505
7010
|
readonly signal?: AbortSignal;
|
|
6506
7011
|
readonly onProgress?: UploadFileProgressCallback;
|
|
6507
7012
|
}
|
|
7013
|
+
interface UploadFileVersionInput {
|
|
7014
|
+
readonly workspaceId: string;
|
|
7015
|
+
readonly itemId: string;
|
|
7016
|
+
readonly expectedVersionId: string;
|
|
7017
|
+
readonly source: Blob;
|
|
7018
|
+
readonly idempotencyKey: string;
|
|
7019
|
+
readonly completionIdempotencyKey: string;
|
|
7020
|
+
readonly signal?: AbortSignal;
|
|
7021
|
+
readonly onProgress?: UploadFileProgressCallback;
|
|
7022
|
+
}
|
|
6508
7023
|
interface GetCurrentWorkspaceInput {
|
|
6509
7024
|
readonly signal?: AbortSignal;
|
|
6510
7025
|
}
|
|
6511
7026
|
interface DriveOperations {
|
|
7027
|
+
getFileAccessContext(input: GetItemInput): Promise<DriveOperationResult<FileAccessContext, 200>>;
|
|
7028
|
+
createFileVersionUpload(input: CreateFileVersionUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
|
|
7029
|
+
commitFileVersion(input: CommitFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
6512
7030
|
createVisitorGrant(input: CreateVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
|
|
6513
7031
|
getVisitorGrant(input: GetVisitorGrantInput): Promise<DriveOperationResult<VisitorGrantCreation, 200>>;
|
|
6514
7032
|
listVisitorGrants(input: GetItemInput): Promise<DriveOperationResult<VisitorGrantPage, 200>>;
|
|
@@ -6520,6 +7038,7 @@ interface DriveOperations {
|
|
|
6520
7038
|
getWorkspaceUsage(input: GetWorkspaceUsageInput): Promise<DriveOperationResult<WorkspaceUsage, 200>>;
|
|
6521
7039
|
getCurrentWorkspaceSources(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspaceSources, 200>>;
|
|
6522
7040
|
getCurrentWorkspace(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
|
|
7041
|
+
ensureOrganizationWorkspaceAccess(input?: GetCurrentWorkspaceInput): Promise<DriveOperationResult<CurrentWorkspace, 200>>;
|
|
6523
7042
|
getItem(input: GetItemInput): Promise<DriveOperationResult<ManagedItemMetadata, 200>>;
|
|
6524
7043
|
searchWorkspaceItems(input: SearchWorkspaceItemsInput): Promise<DriveOperationResult<WorkspaceItemSearchPage, 200>>;
|
|
6525
7044
|
listFolderChildren(input: ListFolderChildrenInput): Promise<DriveOperationResult<FolderPage, 200>>;
|
|
@@ -6582,6 +7101,7 @@ interface DriveVisitorClient {
|
|
|
6582
7101
|
readItem(input?: VisitorReadInput): Promise<DriveOperationResult<VisitorItem, 200>>;
|
|
6583
7102
|
listChildren(input?: VisitorChildrenInput): Promise<DriveOperationResult<VisitorChildren, 200>>;
|
|
6584
7103
|
createDownload(input?: VisitorDownloadInput): Promise<DriveOperationResult<ManagedDownloadDescriptor, 200>>;
|
|
7104
|
+
downloadItem(input?: VisitorDownloadInput): Promise<Response>;
|
|
6585
7105
|
redeemInvitation(input: {
|
|
6586
7106
|
readonly sessionToken: string;
|
|
6587
7107
|
readonly signal?: AbortSignal;
|
|
@@ -6589,7 +7109,8 @@ interface DriveVisitorClient {
|
|
|
6589
7109
|
}
|
|
6590
7110
|
interface DriveServerClient extends DriveOperations {}
|
|
6591
7111
|
interface DriveClient extends DriveOperations {
|
|
7112
|
+
uploadFileVersion(input: UploadFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
6592
7113
|
uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
6593
7114
|
}
|
|
6594
7115
|
//#endregion
|
|
6595
|
-
export {
|
|
7116
|
+
export { ManagedLifecycleItem as $, FolderPage as A, UploadStatus as At, ListFolderChildrenInput as B, WorkspaceDiscoveryItem as Bt, DriveServerClientConfig as C, UploadFilePhase as Ct, EffectivePermissionResponse as D, UploadPartDescriptor as Dt, EffectivePermissionAction as E, UploadFileVersionInput as Et, GetVisitorGrantInput as F, VisitorGrantCreation as Ft, ListWorkspaceItemsInput as G, operations as Gt, ListItemPermissionsInput as H, WorkspaceItemSearchItem as Ht, GetWorkspaceUsageInput as I, VisitorGrantPage as It, ManagedItemMetadata as J, ManagedDownloadDescriptor as K, IncomingShareContext as L, VisitorItem as Lt, GetItemInput as M, VisitorChildrenInput as Mt, GetItemVersionInput as N, VisitorDownloadInput as Nt, FileAccessContext as O, UploadPartResult as Ot, GetUploadStatusInput as P, VisitorGrant as Pt, ManagedItemVersionRestoreResult as Q, IncomingSharePage as R, VisitorReadInput as Rt, DriveServerClient as S, UploadFileInput as St, DriveVisitorClientConfig as T, UploadFileProgressCallback as Tt, ListItemSharingPeopleInput as U, WorkspaceItemSearchPage as Ut, ListIncomingSharesInput as V, WorkspaceDiscoveryPage as Vt, ListItemVersionsInput as W, WorkspaceUsage as Wt, ManagedItemVersionPage as X, ManagedItemVersion as Y, ManagedItemVersionResource as Z, DriveCredentialContext as _, TrashItemInput as _t, CreateFileVersionUploadInput as a, PermissionPage as at, DriveOperations as b, UploadCompletion as bt, CreateUploadInput as c, ReadyUpload as ct, CurrentWorkspace as d, RegisteredRecipientDisplay as dt, PendingUpload as et, CurrentWorkspaceSources as f, RestoreItemInput as ft, DriveClientConfig as g, SearchWorkspaceItemsInput as gt, DriveClient as h, RevokeVisitorGrantInput as ht, CreateDownloadInput as i, PermissionMutation as it, GetCurrentWorkspaceInput as j, VisitorChildren as jt, FolderItem as k, UploadSession as kt, CreateUploadPartDescriptorInput as l, RecordUploadPartInput as lt, DownloadItemResult as m, RevokeItemPermissionInput as mt, CommitFileVersionInput as n, PermissionGrant as nt, CreateFolderInput as o, ProtectionClassification as ot, DeleteItemInput as p, RestoreItemVersionInput as pt, ManagedDownloadRestorePending as q, CompleteUploadInput as r, PermissionGrantee as rt, CreateItemPermissionInput as s, ReadEffectiveItemPermissionsInput as st, AbortUploadInput as t, PermissionAction as tt, CreateVisitorGrantInput as u, RegisterItemRecipientInput as ut, DriveCredentialProvider as v, UpdateItemInput as vt, DriveVisitorClient as w, UploadFileProgress as wt, DriveResponseValidators as x, UploadConfirmedPart as xt, DriveOperationResult as y, UpdateItemPermissionInput as yt, ItemSharingPeoplePage as z, VisitorSession as zt };
|
package/dist/contract2.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as DriveVisitorClientConfig, w as DriveVisitorClient } from "./contract.js";
|
|
2
2
|
//#region src/internal/client/visitors.d.ts
|
|
3
3
|
declare function createDriveVisitorClient(config: DriveVisitorClientConfig): DriveVisitorClient;
|
|
4
4
|
declare function createVisitorSessionToken(): string;
|