@finueva/drive 0.15.0 → 0.17.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 +12 -0
- package/README.md +1 -1
- package/dist/client.d.ts +3 -2
- package/dist/client.js +1 -1
- package/dist/contract.d.ts +214 -3
- package/dist/contract2.d.ts +1 -1
- package/dist/core.d.ts +15 -2
- package/dist/core.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/server.d.ts +3 -2
- package/dist/server.js +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +4 -2
package/dist/contract.d.ts
CHANGED
|
@@ -1008,6 +1008,93 @@ interface operations {
|
|
|
1008
1008
|
};
|
|
1009
1009
|
};
|
|
1010
1010
|
};
|
|
1011
|
+
changeEditingSession: {
|
|
1012
|
+
parameters: {
|
|
1013
|
+
query?: never;
|
|
1014
|
+
header?: never;
|
|
1015
|
+
path: {
|
|
1016
|
+
workspaceId: string;
|
|
1017
|
+
sessionId: string;
|
|
1018
|
+
};
|
|
1019
|
+
cookie?: never;
|
|
1020
|
+
};
|
|
1021
|
+
requestBody: {
|
|
1022
|
+
content: {
|
|
1023
|
+
"application/json": {
|
|
1024
|
+
/** @enum {string} */
|
|
1025
|
+
operation: "renew" | "close" | "revoke";
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
};
|
|
1029
|
+
responses: {
|
|
1030
|
+
/** @description Current lease state. */
|
|
1031
|
+
200: {
|
|
1032
|
+
headers: {
|
|
1033
|
+
[name: string]: unknown;
|
|
1034
|
+
};
|
|
1035
|
+
content: {
|
|
1036
|
+
"application/json": {
|
|
1037
|
+
audience: string;
|
|
1038
|
+
/** Format: uuid */
|
|
1039
|
+
contentGeneration: string;
|
|
1040
|
+
expectedVersionId: string;
|
|
1041
|
+
expiresAt: number;
|
|
1042
|
+
itemId: string;
|
|
1043
|
+
leaseUntil: number;
|
|
1044
|
+
revoked: boolean;
|
|
1045
|
+
/** Format: uuid */
|
|
1046
|
+
sessionId: string;
|
|
1047
|
+
sourceVersionId: string;
|
|
1048
|
+
subject: string;
|
|
1049
|
+
workspaceId: string;
|
|
1050
|
+
writable: boolean;
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
};
|
|
1054
|
+
/** @description Fresh user authority required; delegation cannot mint or renew. */
|
|
1055
|
+
401: {
|
|
1056
|
+
headers: {
|
|
1057
|
+
[name: string]: unknown;
|
|
1058
|
+
};
|
|
1059
|
+
content?: never;
|
|
1060
|
+
};
|
|
1061
|
+
/** @description Authority expired, revoked or insufficient. */
|
|
1062
|
+
403: {
|
|
1063
|
+
headers: {
|
|
1064
|
+
[name: string]: unknown;
|
|
1065
|
+
};
|
|
1066
|
+
content?: never;
|
|
1067
|
+
};
|
|
1068
|
+
/** @description Resource unavailable. */
|
|
1069
|
+
404: {
|
|
1070
|
+
headers: {
|
|
1071
|
+
[name: string]: unknown;
|
|
1072
|
+
};
|
|
1073
|
+
content?: never;
|
|
1074
|
+
};
|
|
1075
|
+
/** @description Authority changed or active-session limit reached. */
|
|
1076
|
+
409: {
|
|
1077
|
+
headers: {
|
|
1078
|
+
[name: string]: unknown;
|
|
1079
|
+
};
|
|
1080
|
+
content?: never;
|
|
1081
|
+
};
|
|
1082
|
+
/** @description Invalid input. */
|
|
1083
|
+
422: {
|
|
1084
|
+
headers: {
|
|
1085
|
+
[name: string]: unknown;
|
|
1086
|
+
};
|
|
1087
|
+
content?: never;
|
|
1088
|
+
};
|
|
1089
|
+
/** @description Persistence unavailable. */
|
|
1090
|
+
503: {
|
|
1091
|
+
headers: {
|
|
1092
|
+
[name: string]: unknown;
|
|
1093
|
+
};
|
|
1094
|
+
content?: never;
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1011
1098
|
listWorkspaceItems: {
|
|
1012
1099
|
parameters: {
|
|
1013
1100
|
query?: {
|
|
@@ -2390,6 +2477,95 @@ interface operations {
|
|
|
2390
2477
|
};
|
|
2391
2478
|
};
|
|
2392
2479
|
};
|
|
2480
|
+
createEditingSession: {
|
|
2481
|
+
parameters: {
|
|
2482
|
+
query?: never;
|
|
2483
|
+
header?: never;
|
|
2484
|
+
path: {
|
|
2485
|
+
workspaceId: string;
|
|
2486
|
+
itemId: string;
|
|
2487
|
+
};
|
|
2488
|
+
cookie?: never;
|
|
2489
|
+
};
|
|
2490
|
+
requestBody: {
|
|
2491
|
+
content: {
|
|
2492
|
+
"application/json": {
|
|
2493
|
+
audience: string;
|
|
2494
|
+
sourceVersionId?: string;
|
|
2495
|
+
writable: boolean;
|
|
2496
|
+
};
|
|
2497
|
+
};
|
|
2498
|
+
};
|
|
2499
|
+
responses: {
|
|
2500
|
+
/** @description Scoped capability; token is returned once. */
|
|
2501
|
+
201: {
|
|
2502
|
+
headers: {
|
|
2503
|
+
[name: string]: unknown;
|
|
2504
|
+
};
|
|
2505
|
+
content: {
|
|
2506
|
+
"application/json": {
|
|
2507
|
+
audience: string;
|
|
2508
|
+
/** Format: uuid */
|
|
2509
|
+
contentGeneration: string;
|
|
2510
|
+
expectedVersionId: string;
|
|
2511
|
+
expiresAt: number;
|
|
2512
|
+
itemId: string;
|
|
2513
|
+
leaseUntil: number;
|
|
2514
|
+
revoked: boolean;
|
|
2515
|
+
/** Format: uuid */
|
|
2516
|
+
sessionId: string;
|
|
2517
|
+
sourceVersionId: string;
|
|
2518
|
+
subject: string;
|
|
2519
|
+
token: string;
|
|
2520
|
+
workspaceId: string;
|
|
2521
|
+
writable: boolean;
|
|
2522
|
+
};
|
|
2523
|
+
};
|
|
2524
|
+
};
|
|
2525
|
+
/** @description Fresh user authority required; delegation cannot mint or renew. */
|
|
2526
|
+
401: {
|
|
2527
|
+
headers: {
|
|
2528
|
+
[name: string]: unknown;
|
|
2529
|
+
};
|
|
2530
|
+
content?: never;
|
|
2531
|
+
};
|
|
2532
|
+
/** @description Authority expired, revoked or insufficient. */
|
|
2533
|
+
403: {
|
|
2534
|
+
headers: {
|
|
2535
|
+
[name: string]: unknown;
|
|
2536
|
+
};
|
|
2537
|
+
content?: never;
|
|
2538
|
+
};
|
|
2539
|
+
/** @description Resource unavailable. */
|
|
2540
|
+
404: {
|
|
2541
|
+
headers: {
|
|
2542
|
+
[name: string]: unknown;
|
|
2543
|
+
};
|
|
2544
|
+
content?: never;
|
|
2545
|
+
};
|
|
2546
|
+
/** @description Authority changed or active-session limit reached. */
|
|
2547
|
+
409: {
|
|
2548
|
+
headers: {
|
|
2549
|
+
[name: string]: unknown;
|
|
2550
|
+
};
|
|
2551
|
+
content?: never;
|
|
2552
|
+
};
|
|
2553
|
+
/** @description Invalid input. */
|
|
2554
|
+
422: {
|
|
2555
|
+
headers: {
|
|
2556
|
+
[name: string]: unknown;
|
|
2557
|
+
};
|
|
2558
|
+
content?: never;
|
|
2559
|
+
};
|
|
2560
|
+
/** @description Persistence unavailable. */
|
|
2561
|
+
503: {
|
|
2562
|
+
headers: {
|
|
2563
|
+
[name: string]: unknown;
|
|
2564
|
+
};
|
|
2565
|
+
content?: never;
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
};
|
|
2393
2569
|
listItemPermissions: {
|
|
2394
2570
|
parameters: {
|
|
2395
2571
|
query?: {
|
|
@@ -5583,7 +5759,7 @@ interface operations {
|
|
|
5583
5759
|
};
|
|
5584
5760
|
};
|
|
5585
5761
|
};
|
|
5586
|
-
/** @description Identity, D1, authorization, entitlement, or trusted capacity authority is unavailable. */
|
|
5762
|
+
/** @description Identity, D1, authorization, entitlement, or trusted capacity authority is unavailable. An admission refusal carries the caller-facing reason. */
|
|
5587
5763
|
503: {
|
|
5588
5764
|
headers: {
|
|
5589
5765
|
[name: string]: unknown;
|
|
@@ -5602,7 +5778,10 @@ interface operations {
|
|
|
5602
5778
|
error: {
|
|
5603
5779
|
/** @enum {string} */
|
|
5604
5780
|
code: "service_unavailable";
|
|
5605
|
-
details:
|
|
5781
|
+
details: {
|
|
5782
|
+
/** @enum {string} */
|
|
5783
|
+
reason?: "upload_admission_saturated" | "upload_admission_stalled" | "unspecified";
|
|
5784
|
+
};
|
|
5606
5785
|
/** @enum {string} */
|
|
5607
5786
|
message: "The service is temporarily unavailable.";
|
|
5608
5787
|
requestId: string;
|
|
@@ -6707,6 +6886,34 @@ type CreateFileVersionUploadInput = Readonly<JsonRequest<"createFileVersionUploa
|
|
|
6707
6886
|
signal?: AbortSignal;
|
|
6708
6887
|
}>;
|
|
6709
6888
|
type FileAccessContext = Readonly<JsonResponse<"getFileAccessContext", 200>>;
|
|
6889
|
+
type EditingSession = Readonly<JsonResponse<"changeEditingSession", 200>>;
|
|
6890
|
+
type EditingSessionCreation = Readonly<JsonResponse<"createEditingSession", 201>>;
|
|
6891
|
+
type CreateEditingSessionInput = GetItemInput & Readonly<JsonRequest<"createEditingSession">>;
|
|
6892
|
+
interface ChangeEditingSessionInput {
|
|
6893
|
+
readonly workspaceId: string;
|
|
6894
|
+
readonly sessionId: string;
|
|
6895
|
+
readonly signal?: AbortSignal;
|
|
6896
|
+
}
|
|
6897
|
+
interface DriveEditingClientConfig {
|
|
6898
|
+
readonly baseUrl: string;
|
|
6899
|
+
readonly token: string;
|
|
6900
|
+
readonly audience: string;
|
|
6901
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
6902
|
+
readonly timeoutMilliseconds?: number;
|
|
6903
|
+
}
|
|
6904
|
+
type DriveEditingServerClient = Pick<DriveOperations, "getFileAccessContext" | "createDownload" | "downloadItem" | "createFileVersionUpload" | "commitFileVersion" | "getUploadStatus" | "createUploadPartDescriptor" | "recordUploadPart" | "abortUpload">;
|
|
6905
|
+
interface EditingFileMetadata {
|
|
6906
|
+
readonly parentItemId: string;
|
|
6907
|
+
readonly displayFilename: string;
|
|
6908
|
+
readonly mediaType: string;
|
|
6909
|
+
readonly protectionClassification: ProtectionClassification;
|
|
6910
|
+
}
|
|
6911
|
+
type EditingFileVersionInput = UploadFileVersionInput & {
|
|
6912
|
+
readonly metadata: EditingFileMetadata;
|
|
6913
|
+
};
|
|
6914
|
+
type DriveEditingClient = DriveEditingServerClient & {
|
|
6915
|
+
uploadFileVersion(input: EditingFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
6916
|
+
};
|
|
6710
6917
|
type CommitFileVersionInput = Readonly<JsonRequest<"commitFileVersion"> & {
|
|
6711
6918
|
workspaceId: string;
|
|
6712
6919
|
itemId: string;
|
|
@@ -7024,6 +7231,10 @@ interface GetCurrentWorkspaceInput {
|
|
|
7024
7231
|
readonly signal?: AbortSignal;
|
|
7025
7232
|
}
|
|
7026
7233
|
interface DriveOperations {
|
|
7234
|
+
createEditingSession(input: CreateEditingSessionInput): Promise<DriveOperationResult<EditingSessionCreation, 201>>;
|
|
7235
|
+
renewEditingSession(input: ChangeEditingSessionInput): Promise<DriveOperationResult<EditingSession, 200>>;
|
|
7236
|
+
closeEditingSession(input: ChangeEditingSessionInput): Promise<DriveOperationResult<EditingSession, 200>>;
|
|
7237
|
+
revokeEditingSession(input: ChangeEditingSessionInput): Promise<DriveOperationResult<EditingSession, 200>>;
|
|
7027
7238
|
getFileAccessContext(input: GetItemInput): Promise<DriveOperationResult<FileAccessContext, 200>>;
|
|
7028
7239
|
createFileVersionUpload(input: CreateFileVersionUploadInput): Promise<DriveOperationResult<UploadSession, 200 | 201>>;
|
|
7029
7240
|
commitFileVersion(input: CommitFileVersionInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
@@ -7113,4 +7324,4 @@ interface DriveClient extends DriveOperations {
|
|
|
7113
7324
|
uploadFile(input: UploadFileInput): Promise<DriveOperationResult<UploadCompletion, 200 | 202>>;
|
|
7114
7325
|
}
|
|
7115
7326
|
//#endregion
|
|
7116
|
-
export {
|
|
7327
|
+
export { ListItemVersionsInput as $, WorkspaceUsage as $t, DriveVisitorClientConfig as A, UploadConfirmedPart as At, GetCurrentWorkspaceInput as B, VisitorChildren as Bt, DriveEditingServerClient as C, RevokeItemPermissionInput as Ct, DriveServerClient as D, UpdateItemInput as Dt, DriveResponseValidators as E, TrashItemInput as Et, EffectivePermissionAction as F, UploadFileVersionInput as Ft, GetWorkspaceUsageInput as G, VisitorGrantPage as Gt, GetItemVersionInput as H, VisitorDownloadInput as Ht, EffectivePermissionResponse as I, UploadPartDescriptor as It, ItemSharingPeoplePage as J, VisitorSession as Jt, IncomingShareContext as K, VisitorItem as Kt, FileAccessContext as L, UploadPartResult as Lt, EditingFileVersionInput as M, UploadFilePhase as Mt, EditingSession as N, UploadFileProgress as Nt, DriveServerClientConfig as O, UpdateItemPermissionInput as Ot, EditingSessionCreation as P, UploadFileProgressCallback as Pt, ListItemSharingPeopleInput as Q, WorkspaceItemSearchPage as Qt, FolderItem as R, UploadSession as Rt, DriveEditingClientConfig as S, RestoreItemVersionInput as St, DriveOperations as T, SearchWorkspaceItemsInput as Tt, GetUploadStatusInput as U, VisitorGrant as Ut, GetItemInput as V, VisitorChildrenInput as Vt, GetVisitorGrantInput as W, VisitorGrantCreation as Wt, ListIncomingSharesInput as X, WorkspaceDiscoveryPage as Xt, ListFolderChildrenInput as Y, WorkspaceDiscoveryItem as Yt, ListItemPermissionsInput as Z, WorkspaceItemSearchItem as Zt, DriveClient as _, ReadyUpload as _t, CreateDownloadInput as a, ManagedItemVersionPage as at, DriveCredentialProvider as b, RegisteredRecipientDisplay as bt, CreateFolderInput as c, ManagedLifecycleItem as ct, CreateUploadPartDescriptorInput as d, PermissionGrant as dt, operations as en, ListWorkspaceItemsInput as et, CreateVisitorGrantInput as f, PermissionGrantee as ft, DownloadItemResult as g, ReadEffectiveItemPermissionsInput as gt, DeleteItemInput as h, ProtectionClassification as ht, CompleteUploadInput as i, ManagedItemVersion as it, EditingFileMetadata as j, UploadFileInput as jt, DriveVisitorClient as k, UploadCompletion as kt, CreateItemPermissionInput as l, PendingUpload as lt, CurrentWorkspaceSources as m, PermissionPage as mt, ChangeEditingSessionInput as n, ManagedDownloadRestorePending as nt, CreateEditingSessionInput as o, ManagedItemVersionResource as ot, CurrentWorkspace as p, PermissionMutation as pt, IncomingSharePage as q, VisitorReadInput as qt, CommitFileVersionInput as r, ManagedItemMetadata as rt, CreateFileVersionUploadInput as s, ManagedItemVersionRestoreResult as st, AbortUploadInput as t, ManagedDownloadDescriptor as tt, CreateUploadInput as u, PermissionAction as ut, DriveClientConfig as v, RecordUploadPartInput as vt, DriveOperationResult as w, RevokeVisitorGrantInput as wt, DriveEditingClient as x, RestoreItemInput as xt, DriveCredentialContext as y, RegisterItemRecipientInput as yt, FolderPage as z, UploadStatus as zt };
|
package/dist/contract2.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as DriveVisitorClientConfig, k 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;
|
package/dist/core.d.ts
CHANGED
|
@@ -3,6 +3,18 @@ declare const DRIVE_API_ERROR_CODES: readonly ["authentication_required", "ident
|
|
|
3
3
|
type DriveApiErrorCode = (typeof DRIVE_API_ERROR_CODES)[number];
|
|
4
4
|
type DriveSdkErrorCode = "invalid_input" | "credential_unavailable" | "network_error" | "timeout" | "aborted" | "invalid_response";
|
|
5
5
|
type DriveErrorCode = DriveApiErrorCode | DriveSdkErrorCode;
|
|
6
|
+
/**
|
|
7
|
+
* The closed public vocabulary Drive may place on `DriveError.details.reason`.
|
|
8
|
+
*
|
|
9
|
+
* A reason narrows an operational refusal the caller can act on. It never carries record identifiers,
|
|
10
|
+
* counts, or state outside the caller's own workspace, and an unknown value is never surfaced.
|
|
11
|
+
*/
|
|
12
|
+
declare const DRIVE_API_ERROR_REASONS: readonly ["upload_admission_saturated", "upload_admission_stalled", "unspecified"];
|
|
13
|
+
type DriveErrorReason = (typeof DRIVE_API_ERROR_REASONS)[number];
|
|
14
|
+
type DriveErrorDetails = Readonly<{
|
|
15
|
+
reason?: DriveErrorReason;
|
|
16
|
+
}>;
|
|
17
|
+
declare function isDriveErrorReason(value: unknown): value is DriveErrorReason;
|
|
6
18
|
declare const DRIVE_API_ERROR_MESSAGES: Readonly<{
|
|
7
19
|
readonly authentication_required: "Authentication is required.";
|
|
8
20
|
readonly identity_authority_unavailable: "Authentication is temporarily unavailable.";
|
|
@@ -26,11 +38,12 @@ declare class DriveError extends Error {
|
|
|
26
38
|
readonly code: DriveErrorCode;
|
|
27
39
|
readonly status: number | null;
|
|
28
40
|
readonly requestId: string | null;
|
|
29
|
-
readonly details:
|
|
41
|
+
readonly details: DriveErrorDetails;
|
|
30
42
|
constructor(code: DriveErrorCode, options?: {
|
|
31
43
|
status?: number;
|
|
32
44
|
requestId?: string | null;
|
|
45
|
+
reason?: DriveErrorReason;
|
|
33
46
|
});
|
|
34
47
|
}
|
|
35
48
|
//#endregion
|
|
36
|
-
export { DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DriveApiErrorCode, DriveError, DriveErrorCode, DriveSdkErrorCode };
|
|
49
|
+
export { DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DRIVE_API_ERROR_REASONS, DriveApiErrorCode, DriveError, DriveErrorCode, DriveErrorDetails, DriveErrorReason, DriveSdkErrorCode, isDriveErrorReason };
|
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({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.`}),
|
|
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`,`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,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DriveApiErrorCode, DriveError, DriveErrorCode, DriveSdkErrorCode } from "./core.js";
|
|
1
|
+
import { $ as ListItemVersionsInput, $t as WorkspaceUsage, A as DriveVisitorClientConfig, At as UploadConfirmedPart, B as GetCurrentWorkspaceInput, Bt as VisitorChildren, Ct as RevokeItemPermissionInput, Dt as UpdateItemInput, E as DriveResponseValidators, Et as TrashItemInput, F as EffectivePermissionAction, Ft as UploadFileVersionInput, G as GetWorkspaceUsageInput, Gt as VisitorGrantPage, H as GetItemVersionInput, Ht as VisitorDownloadInput, It as UploadPartDescriptor, Jt as VisitorSession, Kt as VisitorItem, L as FileAccessContext, Lt as UploadPartResult, M as EditingFileVersionInput, Mt as UploadFilePhase, N as EditingSession, Nt as UploadFileProgress, Ot as UpdateItemPermissionInput, P as EditingSessionCreation, Pt as UploadFileProgressCallback, Qt as WorkspaceItemSearchPage, R as FolderItem, Rt as UploadSession, S as DriveEditingClientConfig, St as RestoreItemVersionInput, T as DriveOperations, Tt as SearchWorkspaceItemsInput, U as GetUploadStatusInput, Ut as VisitorGrant, V as GetItemInput, Vt as VisitorChildrenInput, W as GetVisitorGrantInput, Wt as VisitorGrantCreation, Xt as WorkspaceDiscoveryPage, Y as ListFolderChildrenInput, Yt as WorkspaceDiscoveryItem, Z as ListItemPermissionsInput, Zt as WorkspaceItemSearchItem, _ as DriveClient, _t as ReadyUpload, a as CreateDownloadInput, at as ManagedItemVersionPage, b as DriveCredentialProvider, c as CreateFolderInput, ct as ManagedLifecycleItem, d as CreateUploadPartDescriptorInput, dt as PermissionGrant, et as ListWorkspaceItemsInput, f as CreateVisitorGrantInput, ft as PermissionGrantee, g as DownloadItemResult, gt as ReadEffectiveItemPermissionsInput, h as DeleteItemInput, ht as ProtectionClassification, i as CompleteUploadInput, it as ManagedItemVersion, j as EditingFileMetadata, jt as UploadFileInput, k as DriveVisitorClient, kt as UploadCompletion, l as CreateItemPermissionInput, lt as PendingUpload, m as CurrentWorkspaceSources, n as ChangeEditingSessionInput, nt as ManagedDownloadRestorePending, o as CreateEditingSessionInput, ot as ManagedItemVersionResource, p as CurrentWorkspace, pt as PermissionMutation, qt as VisitorReadInput, r as CommitFileVersionInput, rt as ManagedItemMetadata, s as CreateFileVersionUploadInput, st as ManagedItemVersionRestoreResult, t as AbortUploadInput, tt as ManagedDownloadDescriptor, u as CreateUploadInput, ut as PermissionAction, v as DriveClientConfig, vt as RecordUploadPartInput, w as DriveOperationResult, wt as RevokeVisitorGrantInput, x as DriveEditingClient, xt as RestoreItemInput, z as FolderPage, zt as UploadStatus } from "./contract.js";
|
|
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 createVisitorSessionToken, t as createDriveVisitorClient } from "./contract2.js";
|
|
4
|
-
import { createDriveClient } from "./client.js";
|
|
5
|
-
export { type AbortUploadInput, type CommitFileVersionInput, type CompleteUploadInput, type CreateDownloadInput, type CreateFileVersionUploadInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CreateVisitorGrantInput, type CurrentWorkspace, type CurrentWorkspaceSources, DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, type DeleteItemInput, type DownloadItemResult, type DriveApiErrorCode, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, DriveError, type DriveErrorCode, type DriveOperationResult, type DriveOperations, type DriveResponseValidators, type DriveSdkErrorCode, type DriveVisitorClient, type DriveVisitorClientConfig, type EffectivePermissionAction, type FileAccessContext, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type ListFolderChildrenInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PendingUpload, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type ProtectionClassification, type ReadEffectiveItemPermissionsInput, type ReadyUpload, type RecordUploadPartInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UploadCompletion, type UploadConfirmedPart, type UploadFileInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadFileVersionInput, type UploadPartDescriptor, type UploadPartResult, type UploadSession, type UploadStatus, type VisitorChildren, type VisitorChildrenInput, type VisitorDownloadInput, type VisitorGrant, type VisitorGrantCreation, type VisitorGrantPage, type VisitorItem, type VisitorReadInput, type VisitorSession, type WorkspaceDiscoveryItem, type WorkspaceDiscoveryPage, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, type WorkspaceUsage, createDriveClient, createDriveVisitorClient, createVisitorSessionToken };
|
|
4
|
+
import { createDriveClient, createDriveEditingClient } from "./client.js";
|
|
5
|
+
export { type AbortUploadInput, type ChangeEditingSessionInput, type CommitFileVersionInput, type CompleteUploadInput, type CreateDownloadInput, type CreateEditingSessionInput, type CreateFileVersionUploadInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CreateVisitorGrantInput, type CurrentWorkspace, type CurrentWorkspaceSources, DRIVE_API_ERROR_CODES, DRIVE_API_ERROR_MESSAGES, DRIVE_API_ERROR_REASONS, type DeleteItemInput, type DownloadItemResult, type DriveApiErrorCode, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, type DriveEditingClient, type DriveEditingClientConfig, DriveError, type DriveErrorCode, type DriveErrorDetails, type DriveErrorReason, type DriveOperationResult, type DriveOperations, type DriveResponseValidators, type DriveSdkErrorCode, type DriveVisitorClient, type DriveVisitorClientConfig, type EditingFileMetadata, type EditingFileVersionInput, type EditingSession, type EditingSessionCreation, type EffectivePermissionAction, type FileAccessContext, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type ListFolderChildrenInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PendingUpload, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type ProtectionClassification, type ReadEffectiveItemPermissionsInput, type ReadyUpload, type RecordUploadPartInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UploadCompletion, type UploadConfirmedPart, type UploadFileInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadFileVersionInput, type UploadPartDescriptor, type UploadPartResult, type UploadSession, type UploadStatus, type VisitorChildren, type VisitorChildrenInput, type VisitorDownloadInput, type VisitorGrant, type VisitorGrantCreation, type VisitorGrantPage, type VisitorItem, type VisitorReadInput, type VisitorSession, type WorkspaceDiscoveryItem, type WorkspaceDiscoveryPage, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, type WorkspaceUsage, createDriveClient, createDriveEditingClient, createDriveVisitorClient, createVisitorSessionToken };
|